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 the difference between #import and #include in c++?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
How do you traverse a btree in backward in-order?
What does it mean to declare a member function as static?
What is a wchar_t in c++?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
What is the full form of dos?
How do I start a c++ project?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
You want to link a c++ program to c functions. How would you do it?
Explain the difference between new() and malloc() in c++?
What is the insertion operator and what does it do?
What c++ is used for?
Explain 'this' pointer and what would happen if a pointer is deleted twice?
Which field is used in c++?