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 process bank accounts. Create a base class named Account and two derived classes named Savings and Checking. In the base class, use an int AccountNum and a dou

write aprogram in c++ to overload +,-,=,++ operator using unary and friend function in a single program

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindromes

Q: What are User Defined data types? C supports an extraordinary feature known as "type definition" that permits users to define an identifier that would represent an existing

Access to the channel/devices is achieved by means of general purpose I/O routines Theses are standard functions described in stdio.h header file namely getc and putc. Getc and put

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Define Enumeration in Computer Programming? Enumerated types enclose a list of constants that are able to be addressed in integer values. We can declare variables and types

Implementation of the Dictionary class: int Dictionary::find_word(char *s) {    char word[81];    for (int i = 0; i       if (stricmp(words[i].get_word(word),s) =

Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for