Skip to content

Instantly share code, notes, and snippets.

@Mozart2234
Last active October 20, 2017 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mozart2234/31834cc48e8e0c02e4ae59b7e6a72e56 to your computer and use it in GitHub Desktop.
Save Mozart2234/31834cc48e8e0c02e4ae59b7e6a72e56 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
int i;
int x;
cout << "Ingrese un valor: ";
cin >> i;
cout << "Ingrese otro valor mayor que el primero: ";
cin >> x;
while(i < x){
cout << i << endl;
if(i < 10){
i++;
}
else if(i < 20 && i >= 10){
i +=2;
}
else if(i < 30 && i >= 20 ){
i +=3;
}
else{
i++;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment