Advertisement
dyamondz

Nombres en un interval - P97156

Oct 3rd, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.     int a,b;
  6.     cin>>a>>b;
  7.     if(a<=b){
  8.         for(int i=a;i<=b;++i){
  9.              cout<<i;
  10.              if(i<b) cout<<',';
  11.         }
  12.     }
  13.     cout<<endl;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement