The use of the break and continue statements in a loop, C/C++ Programming

Assignment Help:

Question:

(a) A bank has four types of accounts with annual interest rates as follows:

Savings 8%
Savings with Cheque Book 5%
Current 4%
Fixed deposits 10%

Using the switch statement, write a C++ program that allows a user to input the current balance of an account and the type of account and displays the total interest obtainable.

(b) Loops allow program statements to be repeated either using counter controlled or sentinel controlled. Explain these two terms.

(c) Explain the use of the Break and Continue statements in a loop.

(d) Following a laboratory experiment, an engineering student needs to measure and input a certain number of voltage values of a circuit of n components in series.

Write a C++ program to allow the student to make the above entries and hence calculate the total voltage of the circuit.

Note that the program should ask the student if he/she wants to continue. If he/she answers „y? or „Y? the user will be allowed to enter a new value for n followed by n new values. If he/she answers „n? or „N?, the program should exit. However, if the student does not answer by y/Y or n/N, the program should ignore the answer and prompt him/her to re-enter the answer.


Related Discussions:- The use of the break and continue statements in a loop

Area under curve. , Write a program to find the area under the curve y = f(...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Game, how to make a game

how to make a game

What do you mean by a sequential access file, What do you mean by a sequent...

What do you mean by a sequential access file? - When writing programs which store and retrieve data in a file, it's possible to designate that file into various forms. - A s

Android - iphone mobile game, I am seeking a developer to create a mobile g...

I am seeking a developer to create a mobile game for me. I want an endless runner game with simple controls. The game needs to be a 3D game in a 2D view. The graphics and animation

Recursive functions, a program to determine whether a number is an odd or e...

a program to determine whether a number is an odd or even using recursive function

The Polishing Game, Byteland county is very famous for luminous jewels. Lum...

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

What is the difference among malloc/free and new/delete?, What is the diffe...

What is the difference among malloc/free and new/delete? A: Malloc/free do not know about destructors and constructors. New & delete create and destroy objects, whereas malloc &

Lowest cost entry, code for solving optimal solution for matrix

code for solving optimal solution for matrix

Assigment, Hi is there any chance to get assignment for fresher tutor

Hi is there any chance to get assignment for fresher tutor

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd