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

write a program to find out prime number using sieve case?

2095


What is actual argument?

1060


Is a house a shell structure?

1160


What are different types of pointers?

1068


What is a structure and why it is used?

1220


What is the process of writing the null pointer?

1026


Which header file is essential for using strcmp function?

1479


What is the -> in c?

1007


What is the difference between constant pointer and constant variable?

1222


What is integer constants?

1074


What are the modifiers available in c programming language?

1218


What is the difference between fread and fwrite function?

1077


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1933


What is meant by high-order and low-order bytes?

1047


Write a program to swap two numbers without using a temporary variable?

1122