Professional Documents
Culture Documents
Josua 01217022-PR4
Josua 01217022-PR4
NIM : 012.17.022
1. Using while loop; write a program that prints alphabets ‘a’ through ‘z’ in separate lines. Use %c
in your format string. You can increment a character type variable with ++ operand.
2. Write a program that accepts time in “seconds” format and prints it in minutes and seconds. For
example if you enter 89 it must print: 1:29 (you can use % modulus operator to compute the
remaining of a division)
3. Using for loop, write a program that accepts net sales of a shop for each day. Then calculate sales
for a month then deduct %5 tax and finally calculate “average daily sales” after tax deduction.
Print results on the screen.
a. Input
b. Output