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

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

Example 1.Write a program in C to display the first 10 natural numbers. #include<stdio.h> void main () { int i,n; scanf(“%d”,&n); printf(“The first 10 natural numbers are: “,n); for(int i=1; i<=n;i++) { printf(“%d “,i); } } When you run this code, it will output the numbers 1 through 10 separated by spaces. The loop will … Read more