0
Using for loop name print in horizontal vertical order how to print?
7 Réponses
+ 1
A
Ab
Abc
Abcd
Abcde
Thi order
0
Example?
And what you have tried so far..?
Can you show us your attempt?
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......
0
Bro i am not understand this formula please full details
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();}
0
Ok bro tq
0
Siva Raj
Hoping you complete it..
You can ask again if you stuck between...
Your are welcome...