0% found this document useful (0 votes)
2 views3 pages

PATTERN

The document contains multiple C programming code snippets that illustrate different patterns based on user input. Each snippet includes loops to print numbers in various formats, such as sequential numbers and inverted sequences. The code is structured to take an integer input and generate a corresponding pattern output.

Uploaded by

yazhiinnii
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)
2 views3 pages

PATTERN

The document contains multiple C programming code snippets that illustrate different patterns based on user input. Each snippet includes loops to print numbers in various formats, such as sequential numbers and inverted sequences. The code is structured to take an integer input and generate a corresponding pattern output.

Uploaded by

yazhiinnii
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/ 3

PATTERN

1.

#include<stdio.h>

int main()

int i,j,n;

printf("\nEnter the value:");

scanf("%d",&n);

for(i=1;i<=n;i++){

printf("\n");

for(j=1;j<=i;j++){

i
printf("%d", );

return 0;

2.

#include<stdio.h>

int main()

{
int i,j,n;

printf("\nEnter the value:");

scanf("%d",&n);

for(i=1;i<=n;i++){

printf("\n");

for(j=1;j<=i;j++){

j
printf("%d", );

return 0;

3.

#include<stdio.h>

int main()

int i,j,n,m=1;

printf("\nEnter the value:");

scanf("%d",&n);

for(i=1;i<=n;i++){

printf("\n");

for(j=1;j<=i;j++){

printf("%d",m);

m++;
}
}

return 0;

4.

#include<stdio.h>
int main()
{
int i,j,a;
printf("\nEnter the value:");
scanf("%d",&a);
for(i=1;i<=a;i++)
{
printf("\n");
for(j=1;j<=i;j++)
{

printf("%d",(i-j+1));
}
}
return 0;
}

5.

You might also like