Looping, computer programming, Programming Languages

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
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
Posted Date: 2/7/2012 5:34:31 AM | Location : United States

Related Discussions:- Looping, computer programming, Assignment Help, Ask Question on Looping, computer programming, Get Answer, Expert's Help, Looping, computer programming Discussions

Write discussion on Looping, computer programming
Your posts are moderated
Related Questions
CrowdSporting Website Development I want an advanced web developer to spend 1-2 days coding our newly designed website. It will be a single page scrolling site, fully designed a

On a single XHTML page, include the following two div container elements in the body. Using an external stylesheet, add style to the div elements such that one div has some overlap

write a program to find the output 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1

.NET class libraries in .NET Whether you create value in C# or VB.NET, you are getting in touch with techniques in the same .NET category your local library. The same .NET str

program take integer from user and print in alphabets

How and where to start to develop a preprocessor for java

Board Coloring Problem Description In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color.

Oracle 11G Reports We are troubleshooting the pagination of Oracle reports when printed from a browser. We need help determining the issue and correcting within the report ou

Problem Specification I/O programming is the \bread and butter", the raison d'etre, of microcontrollers. After all, our definition of a microcontroller is \a microprocessor wit

1. Write a program that figures out how long it will take to pay off a credit card by making payments of $10 each month. Take care to avoid infinite loops. (How would a bank preven