Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a C program which will take 30 numbers from the keyboard and display the min of these numbers . By using

•for loop

•while loop

•do while loop


Write a C program which will print the pattern on monitor , the integer N will be taken from key board



1


12


123


1234


12345


_____


_____


12345____n


Come up with the remaining loop , flow , and example on each one .

1.while loop

2.do while loop

3.infinite loop


Two players are each given a set of 3 dice. The first player throws the 3 dice and the

numbers on the top face of each die is recorded. Then the second player similarly

throws his 3 dice and the numbers on the top face of each die is also recorded. The

two sets of readings are compared and a player is deemed to have won that round if

any of the following occurs: -


(a) A set of all same numbers are obtained e.g. all 1s, or all 2s, or any other number

therein. If both players fall into this scenario during that round, then it is a draw

for that round. If only one player throws all the same numbers, then he wins

that round.

(b) Both players throw their dice and obtained three different numbers. All three

numbers are totalled up and whoever has the larger total, wins that round.

However, if the total of both players are the same then it is a draw.

After N rounds, the first player to reach a total accumulated round wins of 10 is declared

the overall winner.


write a c++ program to demonstrate hierachical inheritance to get square and cube of a number. Base class must calculate square of a number whilst Base class2 caculates cube of a numberr


Create a program that will allow user to enter an integer number and display its square root and absolute value

create a program that will display the square root and absolute value of each number that tanges 1-100

Beyond 300 units Rs.5.00 per unit



An electricity board charges the following rates to domestic users to discourage large consumption



of energy.



For the first 100 units Rs 1.50 per unit



For the next 200 untis Rs 3.00 per unit



All users are charged a minimum of Rs. 100. If the total cost exceeds Rs.250, then an additional



surcharge of 15% is added. Write a program to read the name of user and number of units consumed



and print out the charges with name.

An electricity board charges the following rates to domestic users to discourage large consumption of energy. For the first 100 units Rs 1.50 per unit For the next 200 units Rs 3.00 per unit

cause the program to print out the total cars and total cash and then exit. *3. Create a class called time that has separate int member data for hours, minutes, and seconds. One constructor should initialize this data to 0, and another should initialize it to fixed values. Another member function should display it, in 11:59:59 format. The final member function should add two objects of type time passed as arguments. A main() program should create two initialized time objects (should they be const?) and one that isn’t initialized. Then it should add the two initialized values together, leaving the result in the third time variable. Finally it should display the value of this third variable. Make appropriate member functions const


LATEST TUTORIALS
APPROVED BY CLIENTS