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
Need support in Mobile app using AngularJS, Cordova (PhoneGap), Ionicframework We need an experienced front-end developer with a obsession for performance in mobile environment.

Task: This assignment is about writing programmes and Web Services in C#: 1) Develop a console programme that reads a sequence of integer numbers from the console and sorts

What is .NET? It is a foundation fairly neutral structure. Is a coating between the son and the selection language? It can handle many selection dialects, such as VB.NET,

Windows XP using C# load a binary file and send it thru a USB port to the USB port of STM32. STM32 received the file and then write it into an I2C EEPROM.

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Design the proposed implementation using the contract first approach and object oriented approaches.  At a minimum, you must provide an overview of the services in the service arch

Write a Perl program ghici.pl, one of the simplest computer games. The program should generate a random integer between 1 and 1000 and asks the user to guess it. If the user ?nds t

Suppose L is a context-free language and L' is regular. Show that L∩ L' is a context- free language. Specifically, if you're given a PDA diagram of L and a DFA diagram for L' , des

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4