#include<conio.h>
#include<iostream.h>
void function()
{
int j=10;
cout<<j<<"\n" ;
j++;
}
void main()
{
clrscr();
int i=10;
for(i=0;i<10;i++)
{
function();
}
}
OUTPUT::
The following program prints the number 10 ten times.
#include<conio.h>
#include<iostream.h>
void function()
{
static int j=10;
cout<<j<<"\n" ;
j++;
}
void main()
{
clrscr();
int i=10;
for(i=0;i<10;i++)
{
function();
}
}
OUTPUT::
10
11
12
13
14
15
16
17
18
19
#include<iostream.h>
void function()
{
int j=10;
cout<<j<<"\n" ;
j++;
}
void main()
{
clrscr();
int i=10;
for(i=0;i<10;i++)
{
function();
}
}
OUTPUT::
The following program prints the number 10 ten times.
#include<conio.h>
#include<iostream.h>
void function()
{
static int j=10;
cout<<j<<"\n" ;
j++;
}
void main()
{
clrscr();
int i=10;
for(i=0;i<10;i++)
{
function();
}
}
OUTPUT::
10
11
12
13
14
15
16
17
18
19
No comments:
Post a Comment