Question
With C program code with flowchart please Part 1. Write a program named prices.c that repeatedly asks users to enter the price of an item
With C program code with flowchart please
Part 1.
Write a program named prices.c that repeatedly asks users to enter the price of an item until they enter zero. Prices less than zero will be ignored. The program will then print the number of items purchased, the subtotal of the prices, the sales tax charged (at a rate of 7.5%), and the grand total.
Your program must use a while loop or do/while loop.
Here is what a sample run of the program might look like. The cursor for user input must appear on the same line as the input prompt. All monetary values must be displayed with two digits to the right of the decimal point.
Part 2.
At the last US Census in 2010, the population was 308,401,808. To estimate population in non-census years, the Census Bureau uses these statistics (Links to an external site.): One birth every 9 seconds One death every 10 seconds One net international migrant every 47 seconds Write a program named population.c that prints a table of estimated population from 2011 to 2020 (inclusive). This program must use a for loop. Do all calculations using integer arithmetic. Hint: Find out how many people are born, die, and migrate per year. Presume there are 365 days per year. This is not a compound interest problem! Here is what your output might look like. To save space, I am showing only a part of the output. Your output does not have to look exactly like this, but it must reflect the same information. Your output must be labeled with a heading line.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started