write a program that Display numbers from 1 to 5
Answers
Answered by
5
Explanation:
#include <stdio.h>
void main()
{
int i;
printf("The first 5 natural numbers are:\n");
for (i=1;i<=5;i++)
{
printf("%d ",i);
}
printf("\n");
}
Used language-C
Answered by
1
C program to display numbers from 1 to 5
#include <stdio.h>
int main()
{
int i;
printf("The first 5 numbers are:\n");
for (i = 1; i <= 5; i++)
printf("%d ", i);
}
OUTPUT
The first 5 numbers are:
1 2 3 4 5
=>Program has been run in the above attachment
Attachments:
Similar questions