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 |
Name the operators that cannot be overloaded.
It is possible to build a C++ compiler on top of a C compiler. How would you do this?
Write a program to read the values a, b and c and display x, where x=a/b–c. Test the program for the following values: (a) a = 250, b = 85, c = 25 (b) a = 300, b = 70, c = 70
Tell How To Check Whether A Linked List Is Circular ?
Write a C++ Program to Display Number (Entered by the User).
What does malloc return in C and C++?
When must you use a constructor initializer list?
Question on Copy constructor.
Can we call a virtual function from a constructor?
Can we use THIS Pointer in static function – Reason in C++?
Find the Factorial of a number using a program.
What is latest update of C++ ?