Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to print number N times using for loop

Posted By: Ludwik Fischer     Category: C Programming     Views: 10822

Write a program to print number N times using for loop.

Code for Program to print number N times using for loop in C Programming

#include<stdio.h>
#include<conio.h>

void main()
{
    int i,stat();
    clrscr();
    for(i=1;i<=3;i++)
        stat();
    getch();
}
int stat()
{
    staticint x = 0;
    x = x + 1;
    printf("x = %d\n",x);
    return(x);
}
  
Share: 


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

Ludwik Fischer
Ludwik Fischer author of Program to print number N times using for loop is from Frankfurt, Germany.
 
View All Articles

 
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!