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 purpose of clrscr () printf () and getch ()?
Write a program of advanced Fibonacci series.
What is volatile c?
What is the need of structure in c?
Write a program to print “hello world” without using semicolon?
Why do we use static in c?
What do you mean by dynamic memory allocation in c?
What is data structure in c programming?
How to delete a node from linked list w/o using collectons?
Why do we use c for the speed of light?
What is new line escape sequence?
By using C language input a date into it and if it is right?
how many key words availabel in c a) 28 b) 31 c) 32
How can you return multiple values from a function?
Here is a neat trick for checking whether two strings are equal