Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc, char *argv[])
  5. { int y[100], p, L, vstupy, pocet;
  6.  
  7. printf("Vloz pocet vstupu:");
  8.  
  9. scanf("%i", &vstupy);
  10.  
  11. if (vstupy>100)
  12. {
  13.  
  14. printf("Prilis velke. Musi byt mensi nez 100.\n\n");
  15.  
  16. system("PAUSE");
  17. return 0;
  18.  
  19. }
  20.  
  21. for (L=0; L<vstupy; L=L+1)
  22.  
  23. {
  24.  
  25. printf("vloz cislo s poradovym indexem %i:", L+1);
  26.  
  27. scanf("%i", &y[L]);
  28.  
  29. }
  30.  
  31.  
  32. printf("\n\nVstupy v opacnem poradi:\n\n");
  33.  
  34. for (p=vstupy-1; p>=0; p=p-1)
  35.  
  36. {
  37.  
  38. printf("cislo s indexem %i s hodnotou %i \n", p+1, y[p]);
  39.  
  40. }
  41.  
  42. system("PAUSE");
  43. return 0;
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement