Write a program to input an integer from the keyboard and display on the screen “WELL DONE” that many times.

Answer Posted / hr

#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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between struct and class in terms of access modifier.

964


What is a base class?

816


What is namespace & why it is used in c++?

801


Can you please explain the difference between static and dynamic binding of functions?

777


How can we read/write Structures from/to data files?

866


please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html

2019


What is a class and object?

801


What is else if syntax?

891


the maximum length of a character constant can be a) 2 b) 1 c) 8

895


What is a lambda function c++?

795


Write about the retrieval of n number of objects during the process of delete[]p?

795


What do you understand by pure virtual function? Write about its use?

781


What is the arrow operator in c++?

768


What is the example of polymorphism?

754


Who calls main function?

813