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 C++11?

1 Answers   Adobe,


What Is Polymorphism in C++ ?

2 Answers   IBS, Impetus, ITC Indian Tobacco Company, Motorola,


What kind of problems does name mangling cause?

0 Answers   Amazon,


How to delete array of objects in C++? Proof by C++ code for proper deletion

0 Answers  


Define type casting in C++.

0 Answers   Amdocs,


what is the difference between a pointer and a reference?

0 Answers   Amazon, Blue Star, C DAC,


What is the difference between realloc() and free() in C++?

0 Answers   IBS, TCS,


Name the operators that cannot be overloaded.

1 Answers   Wipro,


Explain the difference between C and C++.

0 Answers   Accenture,


What is a class in C++?

1 Answers   Amazon, TCS, UGC Corporation,


How to reverse a string in C++

0 Answers  


How to input string in C++

0 Answers  


Categories