write a program for printing Floyd's triangle

# include<stdio.h> #include<conio.h> void main ( ) { int i, j,k=1; for ( i = 1; i < = 4 ; i ++) { for ( j =...

# include<stdio.h>
#include<conio.h>
void main ( )
{
int i, j,k=1;
for ( i = 1; i < = 4 ; i ++)
{
for ( j =1; j < = i; j ++)
{
 printf("%d\t",k);
 k++;
}
printf (“\n”);
}
getch();
}

Out Put:
1
2 3
4 5 6
7 8 9 10

Related

C Programs 4216440477390692260

Post a Comment

emo-but-icon

item