Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.



Write a program to input an integer from the keyboard and display on the screen “WELL DONE&rdq..

Answer / 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

More C++ Interview Questions

What is a constructor initializer list?

0 Answers   Amazon,


What is C++11?

0 Answers   Adobe,


To solve the 8 Queens problem, which algorithm is used?

0 Answers   Accenture,


What is the difference between virtual functions and pure virtual functions?

1 Answers  


What Is A Conversion Constructor C++ ?

0 Answers   Amazon,






Write a program that ask for user input from 5 to 9 then calculate the average

0 Answers   IBS,


In C++ what is the meaning of data hiding?

0 Answers   Aricent,


Explain the importance of method overloading in C++?

0 Answers   Akamai Technologies, Infogain,


Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69

2 Answers  


Tell us the size of a float variable.

0 Answers   Accenture,


How to invoke a C function using a C++ program?

0 Answers   Alter,


What is conversion constructor in C++

0 Answers   TCS,


Categories