-
//For turbo C++ remove below comments
#include <stdio.h>
//#include<conio.h>
void main()
{
int i,j,n;
//clrscr();
printf("Enter number of rows : ");
scanf("%d",&n);
for (i = 1; i <= n; i++){
for (j = 1; j < i+1; j++){
printf("%d",j);
}
printf("\n");
}
// getch();
}
-
//For turbo C++ remove below comments
#include <stdio.h>
//#include<conio.h>
void main()
{
int i, j, n;
//clrscr();
printf("Enter number of rows : ");
scanf("%d", &n);
for (i = n; i > 0; i--){
for (j = 1; j < i+1; j++){
printf("%d",j);
}
printf("\n");
}
// getch();
}
-
//For turbo C++ remove below comments
#include <stdio.h>
//#include<conio.h>
void main()
{
int i, j, n;
//clrscr();
printf("Enter number of rows : ");
scanf("%d", &n);
for (i = n; i > 0; i--){
for (j = 1; j < i+1; j++){
printf("%d",i);
}
printf("\n");
}
// getch();
}
-
//For turbo C++ remove below comments
#include <stdio.h>
//#include<conio.h>
void main()
{
int i, j, n;
//clrscr();
printf("Enter number of rows : ");
scanf("%d", &n);
for (i = 1; i <= n; i++){
for (j = 1; j < i+1; j++){
printf("%d",i);
}
printf("\n");
}
// getch();
}
Comments
Post a Comment