Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n;
char *str;
str="WELL DONE";
cout<<" Enter an integer value ";
cin>>n;
for(int i=0;i<n;i++)
{
cout<<str<<endl;
}
return 0;
}
OUTPUT:
Enter an integer value 5
WELL DONE
WELL DONE
WELL DONE
WELL DONE
WELL DONE
| Is This Answer Correct ? | 0 Yes | 2 No |
What kind of problems does name mangling cause?
What is Coupling?
What is function overloading and operator overloading in C++?
Can we call a virtual function from a constructor?
What is a memory leak in C++?
What is Copy Constructor?
What is the 4 difference between delete[] and delete?
What is static variable and difference between(const char *p,char const *p,const char* const p).
What does it mean to take the address of a reference?
what is a pragma in C++?
How to stop class inheritance in C++ with condition that object creation should be allowed
What are the different scope C++ provide ?