[solved] – Question 81083

Write a program that implements the algorithm delimterMatching()

delimiterMatching(file)

read character ch from file;

while not end of file

if ch is ‘(‘, ‘[‘, or ‘{‘

puch(ch);

else if ch is ‘)’, ‘]’, or ‘}’

if ch and popped off delimiter do not match

failure;

else if ch is ‘/’

read the next character;

if this character is ‘*’

skip all characters until ‘*/’ is found and report an error

if the end of the file is reached before ‘*/’ is encountered;

else ch = the character read in;

continue; // go to the beginning of the loop;

// else ignore the other characters;

read next character ch from file;

if stack is empty

success;

else failure;

Expert Answer


[solved] – Question 811

How to initialize the class fields before calling of the constructor?

Expert Answer


[solved] – Question 81117

Write a function called arraySum() that takes two arguments: an integer array and the number of elements in the array. Have the function return as its result the sum of the elements in the array.

Expert Answer


[solved] – Question 81123

Write a Python statement that creates a list named dog_breeds that contains the elements
‘collie’, ‘sheepdog’, ‘Chow’, and ‘Chihuahua’.

Expert Answer


[solved] – Question 81128

Little Arjit is in love with Deepa.They have bought a cake, and they weighed it in milligrams – the weight of the cake is always even and now they wish to divide the cake between them in some way, that both of them are satisfied.

Arjit challenges Deepa that if she can divide the weight of the cake as sum of two prime numbers between them, she can have the entire cake – and if she fails to do so, he’ll get the cake.

Input Format:
The first line will contain a number, tc, denoting the number of test cases.

The next tc lines will contain an even number, denoting the weight of the cake in milligrams.

Output Format:
Print “Arjit” or “Deepa” according to the winner.

Constraints:
1 <= tc <= 100
1 <= n <= 100000
1 is NOT a prime number.
Marking Scheme: Marks are awarded if any testcase passes.

Expert Answer


[solved] – Question 81131

You are required to design an application which provides options for food items offered in a Coffee shop, and the customer has to choose between tea or coffee in addition to any other food type. The program should then calculate the total cost for the items selected by the customers:
The prices for the items are as follows:

Tea N$ 14.00
Coffee N$ 16.30
Sandwich N$ 20.50
Burger N$ 23.90
Steak Pie N$ 18.30
Fresh Chips N$ 12.50

Expert Answer


[solved] – Question 812

What does the symbol @ mean before the identificator?

Expert Answer


[solved] – Question 8120

Expert… help me on this problem, i already try many times during this 2 week, but i cant the answer by using m-files.

Determine the real root of f(x)=-26+85x-91x^2+44x^3-8x^4+x^5
Using bisection to determine the root to εs=10 %. Employ initial guesses of xl=0.5 and xu=1.0.
You need to solve the above problem using Matlab

Expert Answer


[solved] – Question 81209

A genetic engineer is in need of a program to generate all the

Expert Answer


[solved] – Question 81215

What is the difference between the four types of computer generations in terms of computating time

Expert Answer