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

what is uses of .net

1721


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3694


Why is structure important for a child?

1085


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2448


What is the best organizational structure?

1110


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1101


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1262


largest Of three Number using without if condition?

1580


Explain the difference between malloc() and calloc() in c?

1035


What is #include stdio h and #include conio h?

1090


What is getch?

1173


Can you apply link and association interchangeably?

1113


What is the use of typedef in structure in c?

957


What is the difference between NULL and NUL?

1278


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1081