0% found this document useful (0 votes)
6 views4 pages

Üçgen-Piramit Yıldız Desenleri in C

The document contains multiple C programming code snippets that generate various patterns using loops. These patterns include sequences of numbers and symbols arranged in different formats based on user-inputted row numbers. Each section of code demonstrates different looping techniques for creating triangular and pyramid-like structures with numbers and characters.

Uploaded by

ahmetfatih085
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Üçgen-Piramit Yıldız Desenleri in C

The document contains multiple C programming code snippets that generate various patterns using loops. These patterns include sequences of numbers and symbols arranged in different formats based on user-inputted row numbers. Each section of code demonstrates different looping techniques for creating triangular and pyramid-like structures with numbers and characters.

Uploaded by

ahmetfatih085
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1

12
123
1234

int i,j,row;
printf("enter the row number");scanf("%d",&row);
i=1;
while(i<=row){
j=1;
while( j<=i){
printf("%d",j);
j++;

}
printf("\n");
i++;
}

1234
123
12
1

1) int i,j,row;
printf("enter the row number");scanf("%d",&row);
i=1;
while(i<=row){
j=1;
while( j<=row+1-i){
printf("%d",j);
j++;

}
printf("\n");
i++;
}

2) for(i=row;i>=1;i--){ ## i=row i-- satırlar


for( j=1;j<=i;j++){ ## j=1’den i’ye sütun
bas
printf("%d",j);
}
printf("\n");
}
####
###
##
#

int i,j,row;
printf("enter the row number");scanf("%d",&row);
i=1;
while(i<=row){
j=row;
while( j>=i){
printf("#");
j--;

}
printf("\n");
i++;
}

1
22
333
4444
int i,j,row;
printf("enter the row number");scanf("%d",&row);
for(i=1;i<=row;i++){
for( j=1;j<=i;j++){
printf("%d",i);
}
printf("\n");
}

1111
222
33
4
int i,j,row;
printf("enter the row number");scanf("%d",&row); ## i=1 i++ satır
for(i=1;i<=row;i++){ ## j=row j-- sütun
for( j=row;j>=i;j--){
printf("%d",i);
}
printf("\n");
1
12
123
1234
123
12
1

int i,j,row;
printf("enter the row number");scanf("%d",&row);
for(i=1;i<=row;i++){
for( j=1;j<=i;j++){
printf("%d",j);
}
printf("\n");
}
for(i=1;i<=row;i++){
for( j=1;j<=row-i;j++){
printf("%d",j);
}
printf("\n");
}

___1
__121
_12321
1234321

int i,j,row;
printf("enter the row number");scanf("%d",&row);
for(i=1;i<=row;i++){
for( j=1;j<=row-i;j++) printf(" ");
for( j=1;j<=i;j++) printf("%d",j);
for( j=i-1;j>0;j--) printf("%d",j);
printf("\n");

}
1234321
_12321
__121
___1

int i,j,row;
printf("enter the row number");scanf("%d",&row);
for(i=row;i>=1;i--){
for( j=1;j<=row-i;j++) printf(" ");
for( j=1;j<=i;j++) printf("%d",j);
for( j=i-1;j>0;j--) printf("%d",j);
printf("\n");

}
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
16 17 18 19 20 21
22 23 24 25 26 27 28

int i,j,num=1;
i=1;
while(i<=7){
j=1;
while( j<=i){
printf("%-3d",num);
num++;
j++;
}
printf("\n");
i++;
}

You might also like