Using for loop name print in horizontal vertical order how to print? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Using for loop name print in horizontal vertical order how to print?

13th Mar 2020, 3:23 PM
Siva Raj
7 Answers
+ 1
A Ab Abc Abcd Abcde Thi order
13th Mar 2020, 3:39 PM
Siva Raj
0
Example? And what you have tried so far..? Can you show us your attempt?
13th Mar 2020, 3:29 PM
Jayakrishna 🇮🇳
0
That's OK. What you tried so far..? Give a try : String name= "your input name"; Take 2 for loops nested.... First for loop does job for number of line : i=0 to lines. 2nd for number of charecters to print name j=0 to i Next line, repeated until end... Hope this helps you......
13th Mar 2020, 3:48 PM
Jayakrishna 🇮🇳
0
Bro i am not understand this formula please full details
13th Mar 2020, 3:56 PM
Siva Raj
0
Do you know how to print charecters from string? How for loop works? If yes, then show printing full name with for loop... Then I will show how to extend it.. Edit: Siva Raj ????? for(int i=0;i<n;i++) for(int j=0;j<i;j++) System.out.print(name.charAt(j); System.out.println();}
13th Mar 2020, 4:05 PM
Jayakrishna 🇮🇳
0
Ok bro tq
13th Mar 2020, 5:51 PM
Siva Raj
0
Siva Raj Hoping you complete it.. You can ask again if you stuck between... Your are welcome...
13th Mar 2020, 5:53 PM
Jayakrishna 🇮🇳