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 structure in c definition?

1044


Explain how can type-insensitive macros be created?

988


What are the types of macro formats?

1115


What is the easiest sorting method to use?

1160


Is c is a middle level language?

1061


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1092


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1236


What is the use of c language in real life?

1023


Tell us bitwise shift operators?

1091


What do you mean by a local block?

1085


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3956


Explain what are global variables and explain how do you declare them?

1162


How can I pad a string to a known length?

1032


Why are algorithms important in c program?

1119


If you know then define #pragma?

1102