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 do you know about Volatile keyword in C++? Explain with an example code.
Name the operators that cannot be overloaded.
Define type casting in C++.
What is Copy Constructor?
When would you use a pointer? A reference?
Do you know about Agilent PRECOMPILERS. ?
How to invoke a C function using a C++ program?
Discuss about iteration statements in C++ .
How does free know the size of memory to be deleted
What are pass by value and pass by reference?what is the disadvantage of pass by value?
What is the difference between virtual functions and pure virtual functions?
How does stack look in function calls? When does stack overflow? What can you do to remedy it?