c1

utorak, 10. travnja 2012.

4. Simple C++ Programs - Tutorial


#include <iostream>
using namespace std;
int main()
{
    int number1;
    int number2;
    cout<<"Please enter first number: ";
    cin>>number1;
    cout<<"Please enter last number: ";
    cin>>number2;
    cout<<"Now we will write all numbers between First and the Last number: "<<endl;
    cout<<"Number are:  ";
    for(int i=number1+1;i<number2;i++){
            cout<<i<<", ";
            }
            cout<<endl<<endl;
    system("PAUSE");
    return EXIT_SUCCESS;
}

Nema komentara:

Objavi komentar