how to print pattern
55555
4444
333
22
1
Answers
Answered by
2
#include<stdio.h>
void main()
{
int i,j;
for(i=5;i>=1;i--)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
void main()
{
int i,j;
for(i=5;i>=1;i--)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}
AliAbbas11:
what is %d
Answered by
41
ANSWER
........
import java.io.*;
public class loopp
{
public static void main(String args[])
{
int a,b;
for (a=5;a>=1;a--)
{
for(b=1;b<=a;b++)
{
System.out.print(a);
}
System.out.println();
}
}
}
Similar questions