Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.
#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 |
What is C++11?
What Is Polymorphism in C++ ?
2 Answers IBS, Impetus, ITC Indian Tobacco Company, Motorola,
What kind of problems does name mangling cause?
How to delete array of objects in C++? Proof by C++ code for proper deletion
Define type casting in C++.
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++?
Name the operators that cannot be overloaded.
Explain the difference between C and C++.
What is a class in C++?
1 Answers Amazon, TCS, UGC Corporation,
How to reverse a string in C++
How to input string in C++