Using function, write program that prints your name 10 times. The Function can take no arguments and should not return any value

Using function, write a complete program that prints your name 10 times

Using function, write a complete program that prints your name 10 times. The Function can take no arguments and should not return any value

Object: Using function, write a complete program that prints your name 10 times. The Function can take no arguments and should not return any value. C++ projects for beginners with source code

Code:

#include<iostream>
#include<conio.h>
using namespace std;
void nam();
void main()
{
cout<<“\n\t:Print Name 10 Times:\n\n”;
nam();
getch();
}
void nam()
{
int i;
for(i=1;i<=10;i++)
{
cout<<i<<“. “<<“Sean\n”;
}
}

#include<iostream>
#include<conio.h>
using namespace std;
void nam();
void main()
{
	cout<<"\n\t:Print Name 10 Times:\n\n";
	nam();
	getch();
}
void nam()
{
	int i;
	for(i=1;i<=10;i++)
	{
		cout<<i<<". "<<"Sean\n";
	}
}

Output:

Using function, write a complete program that prints your name 10 times. The Function can take no arguments and should not return any value

1 thought on “Using function, write program that prints your name 10 times. The Function can take no arguments and should not return any value”

  1. Pingback: C++ projects for beginners with source code - Codeboks

Leave a Comment

Your email address will not be published. Required fields are marked *