4th C++ Simple Program - Tutorial

ssendi By ssendi, 12th Apr 2012 | Follow this author | RSS Feed | Short URL http://nut.bz/26cpib6e/
Posted in Wikinut>Guides>Technology>Computer Software

In this program user types two numbers, and program writes on the screen the numbers between those two....

4th C++ Simple Program - Tutorial

/*
In this program user types two numbers, and program writes on the screen the numbers between those two....
here we use comand "for" it made of few parts
for(initial state;condition;step){
--------;
}



*/
#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;
}

Here you can find more C++ programs...

Tags

Computer, Computer Guide, Computer Software, Computers, Computers Software, Computing, Programmes, Programming, Programming In C, Programming Software, Programs, Programs Information, Progressing, Tutor, Tutor Jobs, Tutorial, Tutorials, Tutoring, Tutoring On The Internet, Tutoring On-Line, Tutors

Meet the author

author avatar ssendi
I'm from Bosnia, and I like computer languages...
On this site I'will mainly write codes for programs, in C++, Java, and HTML...
I also write at http://www.expertscolumn.com

Share this page

moderator Steve Kinsman moderated this page.
If you have any complaints about this content, please let us know

Comments

author avatar Denise O
29th Jun 2012 (#)

Thank you for sharing.:)

Reply to this comment

Add a comment
Username
Can't login?
Password