Write a program to use user defined function with for loop.


 

/* Write a program to use user defined function with for loop.*/

#include<iostream.h>

#include<conio.h>

void main()

{

clrscr();

void paint();

paint();

cout<<endl;

cout<<“no return no value”<<endl;

paint();

getch();

}

void paint()

{

for(int i=1;i<=35;i++)

{

cout<<“*”;

}

}

output:

**********************************

no return no value

**********************************

Related Posts

Comments are closed.