Question: C programming questions Write a program that prints the numbers from 1 to 10. Use the while statement and one of the increment operators. Write
Write a program that prints the numbers from 1 to 10. Use the while statement and one of the increment operators. Write a program that requests a trip distance in miles, a speed in miles/hour, and your name. Calculate how the trip will take and then displays the information in the following form: Sam, your trip of 100 miles at 40 mph will take 2.5 hours. Write a program that prompts the user to enter the number of seconds and then converts that value to hours and minutes. Use a while loop to allow the user to repeadly enter second values and terminate the program when the user enters a value of zero or less. Display the results in the following format: 10000 seconds is 2 hours and 46.67 minutes Write a program that prompts the user to enter a value for the price of an item to be purchased. Move the program add on a sales tax of 5.6%. Do not display any frictional part of the cents value and make sure that the cents value is rounded, not truncated, by using the correct printf conversion specification modifiers. Display the results as shown in the following format: Example 1: Item price of $10.00 with sales tax is 10 dollars and 56 cents Example 2: Item price of $1.00 with sales tax is 1 dollars and 6 cents. Complete the programming exercises and submit your answers into the drop box at the end of this module. Please attach your c program files that you compiled directly into the dropbox. Each program should be a separate attachment so Module 2 should have four attached each with a c file extension. Continue to use standard C formatting and style conventions defined in Module 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
