Guest User

Untitled

a guest
Oct 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4. int i;
  5. int x;
  6.  
  7.  
  8. cout << "Ingrese un valor: ";
  9. cin >> i;
  10.  
  11. cout << "Ingrese otro valor mayor que el primero: ";
  12. cin >> x;
  13.  
  14. while(i < x){
  15. cout << i << endl;
  16. if(i < 10){
  17. i++;
  18. }
  19. else if(i < 20 && i >= 10){
  20. i +=2;
  21. }
  22. else if(i < 30 && i >= 20 ){
  23. i +=3;
  24. }
  25. else{
  26. i++;
  27. }
  28. }
  29. return 0;
  30. }
Add Comment
Please, Sign In to add comment