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


Please Help Members By Posting Answers For Below Questions

What is ostream in c++?

578


What does the linker do?

597


Which is better struts or spring?

624


Differentiate between realloc() and free().

600


What does new in c++ do?

573






C is to C++ as 1 is to a) What the heck b) 2 c) 10

641


Does c++ vector allocate memory?

534


What do you mean by enumerated data type?

580


What is the fundamental idea of oop?

640


What is the error in the code below and how should it be corrected?

313


What is new in c++?

582


What programming language should I learn first?

595


What is a constant? Explain with an example.

563


What are structs in c++?

604


Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?

563