Write a program for coupon redemption, C/C++ Programming

The video game machines at your local arcade output coupons depending on how well you played the game, you can redeem 10 coupons for a candy bar, 6 coupons for .a medium soft drink, or 3 coupons for a pack of gum.

Write a program that inputs the number of coupons you want to redeem, and outputs the number of candy bars, soft drinks, or packs of gum for which the coupons can be redeemed. After you input the number of coupons, clear the screen before displaying the Coupon Redemption Schedule. Account for Input failure. It is possible the user may accidentally enter something other than a number into a numeric field. Expect and correct a possible input failure using clear and ignore statements. Define the redemption rate using constants, something like this:

const int CANDY_BAR_COUPONS = 10;

const int SOFT_DRINK_COUONS = 6;

const int GUM_COUPONS = 3;

 

774_Write a Program for Coupon Redemption.png

Posted Date: 3/2/2013 6:56:17 AM | Location : United States







Related Discussions:- Write a program for coupon redemption, Assignment Help, Ask Question on Write a program for coupon redemption, Get Answer, Expert's Help, Write a program for coupon redemption Discussions

Write discussion on Write a program for coupon redemption
Your posts are moderated
Related Questions
#queWrite 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 c

write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a

how to search, display all data and delete data

Add words in Dictionary: void Dictionary::add( Object& objectToAdd ) {     if( !objectToAdd.isAssociation() )         ClassLib_error( __ENOTASSOC );     else

write an algorithm for multiplication of two sparse matrices using linked lists

Within C we access external devices by means of a pointer i.e. address. The address could point to any memory mapped device i.e. Ram, Rom, Duart, Disk drives etc. Therefore there i

Pointer to function: int mul(int a, int b, int c) {   return a*b*c; } void main() {   int (*function_pointer)(int, int, int);   function_pointer = &mul;

FUNCTIONS It refers to a subprogram that is meant to do a certain task. It is basically used to execute a set of operations and return information to the main or calling functio

flow chart for push operation in stack

Array of Objects: The objects can be declared just like a structure or even a primary data type.  Array of objects may be required to work with large set of data.   When the da