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 |
How does free know the size of memory to be deleted
What do you by Function Overloading in C++?
0 Answers Akamai Technologies, Infogain,
What is a constructor initializer list?
What are string library functions(syntax).
Write a program to read two numbers from the keyboard and display the larger value on the screen
What is an algorithm (in terms of the STL/C++ standard library)?
If class D is derived from a base class B
What's the value of the expression 5["abxdef"]?
How to generate random numbers in C++ with a range?
Explain about Searching and sorting algorithms with complexities
What does it mean to declare a function or variable as static?
Explain the difference between C and C++.