Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.
Answer Posted / hr
#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 |
Post New Answer View All Answers
What is a memory leak in C++?
What is meant by exit controlled loop?
Discuss about iteration statements in C++ .
Why polymorphism is used in oops?
When should we use multiple inheritance?
How do you show the declaration of a virtual constructor?
How to invoke a C function using a C++ program?
What is do..while loops structure?
write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;
What is binary object model?
Explain polymorphism?
What is the benefit of oop?
Why c++ does not have finally?
What is the output of the following program? Why?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create