Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x, y, z;
- do{
- cout << "X : ";
- cin >> x;
- cout << "Y : ";
- cin >> y;
- if(x<=y)
- break;
- }while(true);
- z=0;
- for (int i = x; i <= y; i++){
- if(i>=0){
- cout << i << " ";
- }
- else{
- cout << i << " ";
- }
- z=z;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement