red asked in 電腦與網際網路程式設計 · 1 decade ago

C++程式拜託一下(幫忙解程式)

qus:Write a C++ program to input an integer value from keyboard and display on screen “WELL DONE” for 5 times.

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    #include<stdio.h>

    #include<iostream.h>

    int main() {

    int i;

    int j;

    //輸入一個數字

    cout<<"請輸入一個數字:"<<endl;

    cin>>i;

    //印5次WELL DONE

    for(j = 0; j < 5 ;j++) {

    cout<<"WELL DONE"<<endl;

    }

    return 0;

    }

Still have questions? Get your answers by asking now.