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 / sarvesh

#include<stdio.h>
#include<conio.h>
main()
{
int i,n,j;
int m=1;
clrscr();
printf("enter number");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(j=0;j<=i;j++)
{
printf("%d",m++);
}
printf("\n");
}getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scope and lifetime of a variable in c?

1122


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1156


What is a stream?

1196


What is volatile variable how do you declare it?

1189


What is auto keyword in c?

1252


Write a program to check prime number in c programming?

1150


How pointers are declared?

1011


How to declare a variable?

1073


Explain how do you list a file’s date and time?

1093


What is c definition?

1341


What would be an example of a structure analogous to structure c?

1053


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

2049


What is variable initialization and why is it important?

1342


What is the use of structure padding in c?

1115


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1249