write a program to display numbers from 1 to 10 and 10 to 1?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sureshmca
#include<stdio.h>
void main()
{
int num,i;
for(num=0;num<=10;num++)
{
printf("%d",num);
}
}
| Is This Answer Correct ? | 3 Yes | 9 No |
The differences between Windows XP and Windows Visa
What is c standard library?
Program to find larger of the two numbers without using if-else,while,for,switch
hi , please send me NIC written test papers to sbabavalli@gmail.com
can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,
Can you tell me how to check whether a linked list is circular?
why array index always starts from zero??
what defference between c and c++ ?
write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview
2 Answers Satyam, UNIS, Wipro,
what is level of tree if leaf node is at level 4.please explain.
HOW TO HANDLE EXCEPTIONS IN C