Guest User

Untitled

a guest
Jul 15th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int i=0;
  5. int w=1;
  6. int x[100];
  7. int a=0;
  8. printf("\nEscriu algo\n");
  9. while (w!=0 && i<100)
  10. {
  11. scanf("%i",&x[i]);
  12. a=i;
  13. if(x[a]==0)
  14. {
  15. w=0;
  16. }
  17. i++;
  18. }
  19. i=i-2;
  20. while (i>=0)
  21. {
  22. printf("%i\n",x[i]);
  23. i--;
  24. }
  25. }
Add Comment
Please, Sign In to add comment