Algorithm

Problem Name: beecrowd | 2757

Input and Output of Integers

By Roberto A. Costa Jr, UNIFEI Brazil

Timelimit: 1

Your teacher would like you to do a program with the following characteristics:

1. Create three variables to store whole numbers;
2. Read the first number, which can be a value in the range of: -10000 ≤ A ≤ 10000;
3. Read the second number, which can be a value in the range of: 0 ≤ B ≤ 99;
4. Read the third number, which can be a value in the range of: 0 ≤ C ≤ 999;
5. Print the letter A, a space, the equals sign, a blank, the number stored in the first variable, a comma, a blank, the letter B, a blank, the equal sign, a blank, the number stored in the second variable, a comma, a blank, the letter C, a blank, the equal sign, a blank, the number stored in the third variable. Do not forget to skip line;
6. Repeat procedure 5, putting the number in a 10-digit spacing and justified to the right;
7. Repeat procedure 5, putting the number in a 10-digit spacing and filled with zeros;
8. Repeat procedure 5 by placing the number in a 10-digit spacing and justified to the left.

Input

The entry consists of several test files. Each test file has three rows. In the first line has an integer A (-10000 ≤ A ≤ 10000). In the second line has an integer B (0 ≤ B ≤ 99). In the third line has an integer C (0 ≤ C ≤ 999). As shown in the following input samples.

Output

For each file in the entry, you have an output file. The output file has four rows as described in item 5. As shown in the following output samples.

 Input Samples Output Samples 1234 12 123 A = 1234, B = 12, C = 123 A =       1234, B =         12, C =        123 A = 0000001234, B = 0000000012, C = 0000000123 A = 1234      , B = 12        , C = 123

 4567 78 789 A = 4567, B = 78, C = 789 A =       4567, B =         78, C =        789 A = 0000004567, B = 0000000078, C = 0000000789 A = 4567      , B = 78        , C = 789

 -9991 01 001 A = -9991, B = 1, C = 1 A =      -9991, B =          1, C =          1 A = -000009991, B = 0000000001, C = 0000000001 A = -9991     , B = 1         , C = 1

Code Examples

#1 Code Example with C++ Programming

```Code - C++ Programming```

``````
#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
int a, b, c;
while (cin >> a >> b >> c)
{
cout << "A = " << a << ", B = " << b << ", C = " << c << endl;
printf("A = %10d, B = %10d, C = %10d\n", a, b, c);
printf("A = %010d, B = %010d, C = %010d\n", a, b, c);
printf("A = %-10d, B = %-10d, C = %-10d\n", a, b, c);

}
return 0;
}

``````
Copy The Code &

Input

cmd
1234 12 123

Output

cmd
A = 1234, B = 12, C = 123 A = 1234, B = 12, C = 123 A = 0000001234, B = 0000000012, C = 0000000123 A = 1234 , B = 12 , C = 123

#2 Code Example with Java Programming

```Code - Java Programming```

``````
import java.util.Scanner;
import java.util.Locale;
public class Main {
public static void main(String[] args) {
Locale.setDefault(new Locale("en", "US"));
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
int z = sc.nextInt();
System.out.printf("A = %d, B = %d, C = %d\n",x,y,z);//5
System.out.printf("A = %10d, B = %10d, C = %10d\n",x,y,z);//6
System.out.printf("A = %010d, B = %010d, C = %010d\n",x,y,z);//7
System.out.printf("A = %-10d, B = %-10d, C = %-10d\n",x,y,z);//8
}
}
``````
Copy The Code &

Input

cmd
1234 12 123

Output

cmd
A = 1234, B = 12, C = 123 A = 1234, B = 12, C = 123 A = 0000001234, B = 0000000012, C = 0000000123 A = 1234 , B = 12 , C = 123

#3 Code Example with Javascript Programming

```Code - Javascript Programming```

``````
var lines = input.split('\n');
var prompt = function(texto) { return lines.shift();};

var num = [];

for (let i = 0; i  <  3; i++) {
num.push(parseInt(prompt()).toString());

if (num[i]  <  0) {
}
}

const A = num[0];
const B = num[1];
const C = num[2];

console.log(`A = \${A}, B = \${B}, C = \${C}`);
console.log(
);
``````
Copy The Code &

Input

cmd
1234 12 123

Output

cmd
A = 1234, B = 12, C = 123 A = 1234, B = 12, C = 123 A = 0000001234, B = 0000000012, C = 0000000123 A = 1234 , B = 12 , C = 123