Computer Science, asked by dixitverma23, 4 months ago

write a program to print all the natural numbers from 1 to 10​

Answers

Answered by Anonymous
1

Answer:

Write a program in C to display the first 10 natural numbers.

Pictorial Presentation:

Sample Solution:

C Code: #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"); } ...

Flowchart: ...

C Programming Code Editor:

Answered by anuradhakumari4317
4

Answer:

Print 1 to 10 using do while loop in C

Initialize start number with 1.

Initialize target number to 10.

Enter the do while loop.

print the number.

increment the number.

put condition in while, so that if the value of num exceeds 10, then do while loop will be terminated.

Explanation:

PLEASE thank me dear..............

Similar questions