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
Why we use classes in oop?
Explain polymorphism?
What are the types of container classes?
What is the difference between structures and unions?
What is difference between class and function?
What are the differences between malloc() and calloc()?
Define the process of handling in case of destructor failure?
What is #include c++?
What are the various arithmetic operators in c++?
Why do we use oops?
What is constructor c++?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is abstract class in c++?
What two types of containers does the stl provide?
What is the auto keyword good for in c++?