Write a Program That Reads the Following Information and Prints a Payroll Statement

1. Write a plan to generate and display a table of n and n2,

for integer values of n ranging from ane through 10. Exist sure to print appropriate column headings. 2. Write a C program that prompts for a variable number of integers, adds them up, averages them, and prints out the average The user will enter either an integer to be averaged or a sentinel of 999 indicating that no more numbers are to be entered. When the sentinel is entered, the program will exit the repetition loop. It will then compute and brandish the average of numbers entered. iii. Write a C function named change() that accepts a floating point number of full coins and the addresses of the integer variables named quarters, dimes, nickels, and pennies. The office should determine the number of quarters, dimes, nickels, and pennies in the total coins number passed to information technology and write these values directly into the respective variables declared in its calling office using pointers. Telephone call the function change() from principal() three times and print out the contents of the variables quarters, dimes, nickels, and pennies after each function return. First Phone call—laissez passer in the total value $i.88 and on return print the contents of the variables. Second Call—pass in the full value .32 and on return print the contents of the variables. Tertiary Phone call— ask for a full value input from the keyboard and on return impress the contents of the variables. Output should await like: Total VALUE ENTERED: 1.88 7 quarters ane dime 0 nickels 3 pennies and not: TOTAL VALUE ENTERED: i.88 seven quarters 18 dimes 37 nickels 188 pennies 4. Write a C function named liquid() that is to have an integer number and the addresses of the variables gallons, quarts, pints, and cups. The passed integer represents the full number of cups, and the part is to determine the number of gallons, quarts, pints, and cups in S-xiii the passed value. Using the passed addresses, the part should directly alter the respective variables in the calling function. Apply the relationships of 2 cups to a pint, 4 cups to a quart, and 16 cups to a gallon. Include this part in a programme, printing the results later the part has run. If the user enters 27 cups, the output should exist: 1 gallon two quarts 1 pint one loving cup and non: 1 gallon half dozen quarts 13 pints 27 cups

Answer & Explanation

Verified Solved by verified skilful

<p>icitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus effic</p>
ur laoreet. Nam risus ante, dapibus a molestie c

Unlock total access to Course Hero

Explore over xvi million step-past-pace answers from our library

Subscribe to view answer

7135763.doc

physician

woolfstond1950.blogspot.com

Source: https://www.coursehero.com/tutors-problems/Computer-Science/7135763-1-Write-a-program-to-generate-and-display-a-table-of-n-and-n2-for/

0 Response to "Write a Program That Reads the Following Information and Prints a Payroll Statement"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel