Programming Fundamentals Repository
Write a program, which receives 4 integers on the console and prints them in 4-digit debit card format. See the examples below for the appropriate formatting.
Input | Output |
---|---|
12 | 0012 0433 0001 5331 |
433 | |
1 | |
5331 |
Input | Output |
---|---|
9182 | 9182 4221 0012 0003 |
4221 | |
12 | |
3 |
Input | Output |
---|---|
812 | 0812 0321 0123 0022 |
321 | |
123 | |
22 |
Write a program, which calculates a rectangle’s area, based on its width and height. The width and height come as floating point numbers on the console, **formatted to the 2
nd character after the decimal point**.
Input | Output |
---|---|
2 | 14.00 |
7 | |
7 | 56.00 |
8 | |
12.33 | 61.65 |
5 |