-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHackerrankSolution
More file actions
33 lines (25 loc) · 884 Bytes
/
HackerrankSolution
File metadata and controls
33 lines (25 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("================================");
for(int i=0;i<3;i++){
String s1=sc.next();
int x=sc.nextInt();
System.out.print(s1);
for(int j = 1; j<16-s1.length(); j++){
System.out.print(" ");
}
if(x < 100 & x!=0){
System.out.println("0"+x);
}
else if(x==0){
System.out.println("000");
}
else{
System.out.println(x);
}
}
System.out.println("================================");
}
}