C++ Programming

C++ Take an Input and Print the Message “Well Done”

Write a program to input an integer value from keyboard and display on screen “Well done” that many times.

Algorithm

  • Start
  • Read the number of repetition, n.
  • If i<=n goto step 4, else goto step 5.
  • Display WELDONE, goto step 3.
  • End

Source Code

#include<iostream>

#include<conio.h>

using namespace std;

int main ()

{

    int i,n;

    cout<<"Enter the number of repetition: ";

    cin>>n;

    for(i=0;i<n;i++)

        {

            cout<<"WELL DONE"<<endl;

        }

    getch();    

}

Output

 

Back to top button