Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

code snippet for creating a pyramids triangle
ex

1
2 2
3 3 3

Answer Posted / rajesh kamar s

void main()

{
int n,i,j;
printf("enter the num of rows\t:");
scanf("%d",&n);

for(i=1;i<=n;i++)
{
for(int k=0;k<n-i;k++)
printf(" ");
for(j=1;j<=i;j++)
printf("%d ",i);
printf("\n");
}
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c so important?

997


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2815


What will be the outcome of the following conditional statement if the value of variable s is 10?

1232


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

5142


What is a program flowchart and how does it help in writing a program?

1083


What is #pragma statements?

1054


How can I list all of the predefined identifiers?

928


The __________ attribute is used to announce variables based on definitions of columns in a table?

1132


write an algorithm to display a square matrix.

2640


What is d scanf?

1027


What are the 4 data types?

964


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1585


How are structure passing and returning implemented?

985


What is the difference between functions getch() and getche()?

1036


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

1227