Page 642 - Computer science 868 Class 12
P. 642
26 }
27 System.out.println("OUTPUT: ");
28 for(int i=0;i<l;i++)
29 {
30 for(int j=0;j<n;j++)
31 {
32 if(i<name[j].length())
33 System.out.print(name[j].charAt(i)+"\t");
34 else
35 System.out.print("\t");
36 }
37 System.out.println();
38 }
39 }
40 public static void main()
41 {
42 banner ob=new banner();
43 ob.input();
44 ob.output();
45 }
46 }
Output of the preceding program is as follows:
N = 3
Team 1: Maruti
Team 2: Fiat
Team 3: Ford
OUTPUT:
M F F
a i o
r a r
u t d
t
i
640640 Touchpad Computer Science-XII

