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 |
How can you tell whether two strings are the same?
what are the compilation steps? ( i want inside the compiler )
Difference between Class and Struct.
13 Answers Ericsson, Motorola, Wipro,
Hi Every one...........I have been selected for the SBI Clerk. But i m one month Pregnanat. So anyone please suggest me, is they take any objection on my joining .
4 Answers State Bank Of India SBI,
Write a program to print factorial of given number using recursion?
Is main() function predfined or userdefined?
What are the differences between Structures and Arrays?
Why do we need functions in c?
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
What is the most efficient way to store flag values?
how c source file in converted to exe file
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?