Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main ()
  4. {
  5. int n, incremento = -1;
  6. scanf("%d",&n);
  7.  
  8. if ( n < 0 )
  9. incremento = 1;
  10.  
  11. while( n != 0 )
  12. {
  13. printf("%d", n);
  14. n += incremento;
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement