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...

how can i get output like this?
1
2 3
4 5 6

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
int n;
printf("enter the terms :");
scanf("%d",&n);
count=1;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=(i);j++)
printf("%d ",count++);
printf("\n");
}
getch();
}


thank u

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an identifier?

1087


What is a dynamic array in c?

1225


Why void main is used in c?

1104


Explain what is a const pointer?

1123


How to find a missed value, if you want to store 100 values in a 99 sized array?

1463


Describe wild pointers in c?

1166


please explain every phase in the "SDLC" in the dotnet.

2671


Write a program for Overriding.

1214


How can I make it pause before closing the program output window?

1081


Write a program to print “hello world” without using semicolon?

1183


What are the benefits of c language?

1228


How does pointer work in c?

1195


What is the use of bitwise operator?

1174


What are the two forms of #include directive?

1221


What is the difference between a string and an array?

1259