write a C program to print number from 1 to 10
Answers
Answered by
1
#include <stdio.h>
void main()
{
int i;
printf("The first 10 natural numbers are:\n");
for (i=1;i<=10;i++)
{
printf("%d ",i);
}
printf("\n");
}
Answered by
1
C program to print number from 1 to 10
#include <stdio.h>
int main() {
int i;
for (i = 1; i <= 10; i++)
{
printf("%d ", i);
}
return 0;
}
OUTPUT
1 2 3 4 5 6 7 8 9 10
Note: Program has been run in the above attachment!
Attachments:


Similar questions