how to print this pattern in java
1
2 3
4 5 6
7 8 9 10
Answers
Answered by
0
Answer:
class NumberPattern
{
public static void main(String[] args)
{
for (int i = 1; i <= 5; i++)
{
for (int j = 1; j <= i; j++)
{
System.out.print(j+" ");
}
System.out.println();
}
}
}
I hope it will surely help you...
Answered by
1
include<stdio.h>
int main(){
int n,i,m=0,flag=0;
printf("Enter the number to check prime:");
scanf("%d",&n);
m=n/2;
for(i=2;i<=m;i++)
thanks
Similar questions