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
write a program to find the area under the curve y=f(x) between x=a and x=b integrate y=f(x)   #include float start_point, /* GLOBAL VARIABLES */

Scope Resolution operator: The scope resolution operator: : is used to access global variable in the inner block. When global and local variable are identical name the scope re

Write a function that has two int parameters num and n, and returns TRUE when the nth bit in num is 1, otherwise FALSE. This function should use the function in the above problem.

A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate

The Preprocessor Directives A preprocessor directive which starts with a hash '#' ,is an instruction to the preprocessor, which acts on the source code before the compilation p

Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc #include stdio.h   void main()   {   char promt;      int factor;   factor = 1*2*3*4*5;   printf("The fac

Relational Operators A relational operator is used to make comparison among two values. All these operators are binary and needs two operands. There are the following relationa

write a simple c++ program to implement a stack: 1. push 2. pop

Example for external storage class - computer programming? extern double sin (double); In a function prototype, for the sin() function its function definition ~ we can write

Requirements Create a "makefile" that will manage the construction of a program The name of the makefile must be: makefile The make file must produce an executable