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 |
Write a C++ Program to find Square Root of a number using sqrt() function.
In C++ what is a vtable and how does it work?
What is the difference between an ARRAY and a LIST in C++?
In C++ what is the meaning of data hiding?
What is a constructor initializer list?
How to generate random numbers in C++ with a range?
Without using third variable write a code to swap two numbers.
What is wrong with this statement? std::auto_ptr ptr(new char[10]);
How do you work around them?
What do you by Function Overloading in C++?
0 Answers Akamai Technologies, Infogain,
What is the difference between Stack and Queue in C++?
0 Answers Global Logic, iNautix,
In C++ what do you mean by Inheritance?