Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » BeginnersRSS Feeds

Program to display numbers using for loop

Posted By: Finley Evans     Category: C Programming     Views: 5089

Write a program to display numbers using for loop.

Code for Program to display numbers using for loop in C Programming

#include <stdio.h>
main()
{
int i,n;  
scanf("%d",&n); 
for(i = 0; i<n; i= i+1)   // statement A
{
printf("the numbers are %d \n",i); // statement B
}
}
  
Share: 


Didn't find what you were looking for? Find more on Program to display numbers using for loop Or get search suggestion and latest updates.

Finley Evans
Finley Evans author of Program to display numbers using for loop is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!