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 |
When would you use a pointer? A reference?
What is Coupling?
Write a syntax and purpose of switch statement.
CDPATH shell variable is in(c-shell)
Explain the operator overloading feature in C++ ?
Find the Factorial of a number using a program.
What Is A Default Constructor in C++ ?
When must you use a constructor initializer list?
What is the difference between Stack and Queue in C++?
0 Answers Global Logic, iNautix,
Define type casting in C++.
Tell us the size of a float variable.
When would you choose to return an error code rather than throw an exception?