write a program to get a pattern:
147
258
369
Answers
Answered by
1
Answer:
hope it helps
Explanation:
import java.util.*;
class ga
{
public static void main(String args[])
{
int sum=1;
for(int i=0;i<3;i++)
{
for(int j=i+1;j<=9;j+=3)
{
System.out.print(j);
}
System.out.println();
}
}
}
Answered by
4
Answer:
Explanation:
import java.util.*;
class ga
{
public static void main(String args[])
{
int sum=1;
for(int i=0;i<3;i++)
{
for(int j=i+1;j<=9;j+=3)
{
System.out.print(j);
}
System.out.println();
}
}
}
Similar questions