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 ostream in c++?
What does the linker do?
Which is better struts or spring?
Differentiate between realloc() and free().
What does new in c++ do?
C is to C++ as 1 is to a) What the heck b) 2 c) 10
Does c++ vector allocate memory?
What do you mean by enumerated data type?
What is the fundamental idea of oop?
What is the error in the code below and how should it be corrected?
What is new in c++?
What programming language should I learn first?
What is a constant? Explain with an example.
What are structs in c++?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?