1.Write a program that will read in the names (multiple-word string, ie with blanks) and sales amounts (float) for 2 staff members. It will then print the values in the following format. Use gets()...


1.Write a program that will read in thenames (multiple-word string, ie with blanks) andsales amounts(float) for 2 staff members. It will then print the values in the following format. Use gets() functions to read the string values. Use field modifiers to format the output, so that the field width for staff name is 20 and it is left-justified. The field width for sales amount is 12 with 2 decimal places.


(Use C code (stdio.h, scanf, get, printf...) to create the program.)










Enter staff name > Ang Boon Ching


Enter sales amount > 2500.00



Enter staff name > Tong Eng Fang


Enter sales amount > 900.00



Staff Name Sales Amount


==================== ============


Ang Boon Ching 2500.00


Tong Eng Fang 900.00



Enter staff name<br>Ang Boon Ching<br>Enter sales amount<br>2500.00<br>Tong Eng Fang<br>900.00<br>Enter staff name<br>Enter sales amount<br>Staff Name<br>Sales Amount<br>======<br>2500.00<br>Ang Boon Ching<br>Tong Eng Fang<br>900.00<br>

Extracted text: Enter staff name Ang Boon Ching Enter sales amount 2500.00 Tong Eng Fang 900.00 Enter staff name Enter sales amount Staff Name Sales Amount ====== 2500.00 Ang Boon Ching Tong Eng Fang 900.00

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here