File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change 22
22
*/
23
23
import java .util .Scanner ;
24
24
25
- public class FormattedOutput {
25
+ public class Solution {
26
26
27
27
public static void main (String [] args ) {
28
- Scanner sc =new Scanner (System .in );
28
+ Scanner sc =new Scanner (System .in );
29
29
System .out .println ("================================" );
30
- for (int i =0 ;i <3 ;i ++)
31
- {
30
+ for (int i =0 ;i <3 ;i ++){
32
31
String s1 =sc .next ();
33
32
int x =sc .nextInt ();
34
- String s2 =sc .next ();
35
- int y =sc .nextInt ();
36
- String s3 =sc .next ();
37
- int z =sc .nextInt ();
38
- System .out .printf ("%-14s %03d" , s1 , x );
39
- System .out .println ();
40
- System .out .printf ("%-14s %03d" , s2 , y );
41
- System .out .println ();
42
- System .out .printf ("%-14s %03d" , s3 , z );
43
- System .out .println ();
44
- System .out .println ("================================" );
33
+ System .out .printf ("%-14s %03d\n " , s1 , x );
45
34
}
35
+ System .out .println ("================================" );
36
+
46
37
}
47
38
}
You can’t perform that action at this time.
0 commit comments