Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,x;
- cout << "Introdusca un numero: ";
- cin >> a;
- cout << "Introdusca otro numero: ";
- cin >> b;
- cout <<endl;
- if (a<b) {
- for (x=a;x<=b;x++)
- {
- cout << x<< endl;
- }}
- else {
- for (x=b;x<=a;x++)
- {
- cout << x<< endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement