PRINT THE PATTERN IN JAVA NESTED FOR LOOP :-
Attachments:
Answers
Answered by
0
Answer:
Explanation:
class Sample
{
public static void main(String args[])
{
int k=1;
for(int i=4;i>=1;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(k + " ");
}
System.outprintln();
k=k+2;
}
}
}
Similar questions
Hindi,
3 months ago
Math,
3 months ago
Math,
3 months ago
Accountancy,
7 months ago
Math,
7 months ago
Science,
1 year ago
Psychology,
1 year ago
Math,
1 year ago