Question: In C programming Write a program that will read five values from the keyboard (you must use a loop) and store them in an array
In C programming

Write a program that will read five values from the keyboard (you must use a loop) and store them in an array of type float with the name "amounts". Create two arrays of five elements of type long with the names "dollars" and "cants". Store the whole number part of each value in the "amounts" array in the corresponding element of "dollars" and the fractional part of the amount as a two-digit integer in "cents" (e.g., 2.75 in "amounts" [1] would result in 2 being stored in "dollars" [1] and 75 being stored in "cents" [1]). Output the values from the two arrays of type long as monetary amounts (e.g., $2.75)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
