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

write a program to display numbers from 1 to 10 and 10 to 1?

Answer Posted / sai

#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
for(i=1;i<=10;i++)
printf(" %d",i);
printf("\n");
for(i=10;i>=1;i--)
printf(" %d",i);
getch();
}

/* output
1 2 3 4 5 6 7 8 9 10
10 9 8 7 6 5 4 3 2 1 */

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is getch c?

1313


differentiate built-in functions and user – defined functions.

1106


How are portions of a program disabled in demo versions?

1306


What is spark map function?

1149


How many types of sorting are there in c?

1071


Differentiate fundamental data types and derived data types in C.

1048


what is the function of pragma directive in c?

1135


Explain what is wrong in this statement?

1137


Why header files are used?

1130


What is self-referential structure in c programming?

1230


What is a list in c?

1046


Explain what is gets() function?

1090


Sir i need notes for structure,functions,pointers in c language can you help me please

2431


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

1129


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1098