Looping, computer programming, Programming Languages

Assignment Help:
You are required to develop a program that calculates the charges for DVD rentals, where current release cost RM3.50 and all others cost RM2.50. If a customer rents several DVDs, every third one is free. The continue statement is used to skip the part of the loop that calculates the charges for every third DVD. The following are the program output with example input shown in bold:
Figure 1: Program Output with Example Input Shown in Bold
END OF ASSIGNMENT QUESTION
How many DVDs are being rented? 6
Is DVD #1 a current release? (Y/N) Y
Is DVD #2 a current release? (Y/N) N
DVD #3 is free!
Is DVD #4 a current release? (Y/N) Y
Is DVD #5 a current release? (Y/N) N
DVD #6 is free!
The total is RM12.00

Related Discussions:- Looping, computer programming

C programming, write a function that raises an integer to a positive intege...

write a function that raises an integer to a positive integer power. call the function x_to_the_n taking two integer arguments x and n. have the function return a long int, which r

Assembly language, how to concatinate two strings in assembly

how to concatinate two strings in assembly

Write c sharp application to read a data, A number of simple student record...

A number of simple student records are written to a text file. The format of some typical linesshould be - Task (1): Using a text editor, create a file with 10 such reco

Cobol, Need help with a cobol program.

Need help with a cobol program.

Write a program that will input two number from the keyboard, Write a progr...

Write a program that will input two numbers from the keyboard and execute each of the signed and unsigned multiply and divide instructions.  For each instruction, the program shoul

3-Tier Architecture in asp.net, I am getting error at business layer object...

I am getting error at business layer object in code behind page.

Advance microprocessor, Write a program to mask bits D3D2D1D0 and to set bi...

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of the AX register.

Double roots, This case will lead to similar problem that we've had all oth...

This case will lead to similar problem that we've had all other time we've run in double roots or double eigenvalues. We only find a single solution and will require a second solut

Explain the do - while statement - computer programming, Explain the Do - W...

Explain the Do - While Statement - Computer Programming? A do - while loop is an exit controlled loop and the body of the loop gets executed at least once if the condition is n

Example of arithmetic involving matrices, Example- Arithmetic :  Given th...

Example- Arithmetic :  Given the subsequent two matrices, So calculate A-5B. Solution There isn't much to do now other than the work. We first multiplied

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