Skip to content

Commit 00efdc8

Browse files
authored
Add files via upload
1 parent 463a1c5 commit 00efdc8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Java Output Formatting.java

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import java.util.Scanner;
2+
3+
public class Solution {
4+
5+
public static void main(String[] args) {
6+
Scanner sc=new Scanner(System.in);
7+
System.out.println("================================");
8+
for(int i=0;i<3;i++){
9+
String s1=sc.next();
10+
int x=sc.nextInt();
11+
System.out.printf("%-15s%03d\n",s1,x);
12+
//Complete this line
13+
}
14+
System.out.println("================================");
15+
16+
}
17+
}

0 commit comments

Comments
 (0)