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
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
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
Find out the selling cost average for packages developed in Pascal

I need help I want to implement the Genetic Algorithm for Shortest path Kindly Help me I will be thankful to you

We now require starting looking into finding a particular solution for n th order differential equations. The two ways which we'll be looking at are similar as those which we look

JavaScript is "Object Oriented" like C++ or Java. (Note that Java and JavaScript are not the same language, which is a common misconception) It also has variables, which makes Java

Explain the Goto Statement - Computer Programming? The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part o

Write a Prolog predicate has_duplicates(L) that is true if list L contains duplicated elements (that is at least 2 copies of an element). For instance: ?- has_duplicates([a,e,b,

.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

COS-101: INTRODUCTION TO COMPUTERS PROJECT DESCRIPTION The Computer Fundamentals Project provides you with a chance to apply what you have learned about computer fundamentals to

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following i

The program presents mainframe contains two button new user, existing user PART ONE: CLICKING ON NEW USER New window appear contains: text field represent username,