Sunday, October 2, 2022
HomeUncategorizedPYRAMID PROBLEM IN C PROGRAMMING LANGUAGE BEST WITH OUTPUT SCEENSHOT

PYRAMID PROBLEM IN C PROGRAMMING LANGUAGE BEST WITH OUTPUT SCEENSHOT

#include
int main()

{
    int i,j,n;
printf(“Enter number of lines : “);
scanf(“%d”,&n);
for(i=1; i<=n; i++)  /*this loop used for printing lines or rows only*/
{
for(j=1; j<=i; j++)/*this loop used for printing values inside the lines or rows*/
printf(“%2d”,i);
printf(“n”);
}
return 0;
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular