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
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”;
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #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"; } } |
1 Response
[…] Using function, write program that prints your name 10 times. The Function can take no arguments and… […]