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
What is the use of define in c?
What is the maximum no. of arguments that can be given in a command line in C.?
What does node * mean?
What is character constants?
What are the string functions? List some string functions available in c.
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
There seem to be a few missing operators ..
How do you list files in a directory?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
Is file a keyword in c?
Who invented b language?
What is identifier in c?
What is include directive in c?
What is action and transformation in spark?