C exercise

...given an initial value in pence. For example, a sum of 37pence would require three 10p coins, one 5p coin and two 1p coins. Check the program, compile and run it using various sums of money to test it. /* Calculates minimum number of coins for a sum of money */ #include main() { /* Description … Calculate number of 10p coins and amount left over Calculate number of 5p coins and 1p coins Display results */ } 3. Assuming that a, b, and c have been assigned real values, write a C assignment statement to evaluate the following: 2a+4c 3b 4. A program is required to calculate and display an employee’s gross and net pay. Gross pay is given by: Basic pay + overtime rate * overtime hours. Tax is deducted from the gross pay at the current rate of 22% to obtain the net pay. The tax rate (.22), an overtime rate (10.50) and the normal working week of 40 hours should be defined as ...

Essay Information


Words: 264
Pages: 1.1
Rating: None

All Papers Are For Research And Reference Purposes Only. You must cite our web site as your source.