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 getch c?
differentiate built-in functions and user – defined functions.
How are portions of a program disabled in demo versions?
What is spark map function?
How many types of sorting are there in c?
Differentiate fundamental data types and derived data types in C.
what is the function of pragma directive in c?
Explain what is wrong in this statement?
Why header files are used?
What is self-referential structure in c programming?
What is a list in c?
Explain what is gets() function?
Sir i need notes for structure,functions,pointers in c language can you help me please
Write a program to print “hello world” without using semicolon?
any "C" function by default returns an a) int value b) float value c) char value d) a & b