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 I call fortran?
Stimulate calculators to perform addition,subtraction,multiplication and division on two numbers using if/else statement?
Write a program which take a integer from user and tell whether the given variable is squar of some number or not. eg: is this number is 1,4,9,16... or not
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));
What are void pointers in c?
When should a type cast be used?
main() { printf(5+"Vidyarthi Computers"); }
Where are the auto variables stored?
write a c program for greatest of three numbers without using if statment
size maximum allocated by calloc()
how to add two numbers without using arithmetic operators?
What is function pointer and where we will use it