Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do program7 , using c++ and printf and scanf , not cin and cout. For full credit on each program, please paste your output to

Do program7 , using c++ and printf and scanf , not cin and cout. image text in transcribed
image text in transcribed
For full credit on each program, please paste your output to the comment and comment. Also please make sure to format your output properly X Program 1: Write a C program which will allow the user to enter in two integers and will print out the two integers, the sum, difference, product, quotient (a cast will be needed), modulus, and average (a cast will be needed) of the two integers xProgram 2: You need a program to maintain information about grocery items. Assume that you have the following grocery items: Item Name Cereal Chocolate CandySnickers Mik Bananas Brand |Quantity Unit Price |Discount % Yum Yum Cereal $6.19 $1.99 $4.89 6.4% 928% 5.72% 12.15% Have A Cow Chiquita 15 Write a C program that will perform the following tasks: Task 1: Allow the user to enter in the data for each grocery item. (The user will not enter the S or % symbols) Task 2: For each grocery item, calculate the cost, discount amount, and the cost with discount. The formulas to use are as follows: Cost Unit Price Quantity Discount Amount-Cost , Discount % / 100 Cost With Discount Cost- Discount Amount Task 3: Print out the item name for each grocery item followed by the results of your three calculations from Task 2 four of the grocery items Program 3: Rewrite Program 2 by calculating the discount % to use for each grocery item. e and print the total cost, the total discount amount, and the total cost with discount for all The user will Use the following discount percentages: no longer enter the discount % from the keyboard. Discount% Quantity 1 to 3 4 to 7 8 to 12 More than 12 3.8% 5.1% 7.4% 9.8%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions

Question

=+ Are they breakable for any reason?

Answered: 1 week ago