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

a simple c program using 'for' loop to display the output

5

4

3

2

1

Answer Posted / prayashjeet chanda

#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();

int num,i;

printf("\nEnter a number: ");
scanf("%d",&num);

for(i=num;i>0;i--)
{
printf("\n%d",i);
}

getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of putchar function?

1110


How many bytes is a struct in c?

1217


How many loops are there in c?

1165


What is the difference between void main and main in c?

1214


What is the function of volatile in c language?

1186


How do I get an accurate error status return from system on ms-dos?

1180


what is different between auto and local static? why should we use local static?

1172


What does *p++ do?

1077


What is the use of function in c?

1251


Describe the steps to insert data into a singly linked list.

1118


What is enumerated data type in c?

1131


Explain what are compound statements?

1106


What is the purpose of clrscr () printf () and getch ()?

1114


Create a simple code fragment that will swap the values of two variables num1 and num2.

1329


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1160