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 the difference between creating an object, using 'new' and using 'malloc'?
What is a constructor initializer list?
Difference between function overloading and function overriding.
CDPATH shell variable is in(c-shell)
Write a C++ Program to Find Sum and Average of three numbers.
Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69
Explain what happens when an exception is thrown in C++.
Tell us the size of a float variable.
What is placement new?
Define namespace.
How will you print a list of all unique words from a string which may contain repeated words?
What is Boyce Codd Normal form?