Advertisement
DoGy70

Untitled

Mar 28th, 2023
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. 3 zadacha
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. int main(void)
  5. {
  6. int sz;
  7. printf("Enter the size of array::");
  8. scanf("%d",&sz);
  9. int randArray[sz],i;
  10. for(i=0;i<sz;i++)
  11. randArray[i]=rand()%10;
  12. printf("\nElements of the array::");
  13. for(i=0;i<sz;i++)
  14. {
  15. printf("\nElement number %d::%d",i+1,randArray[i]);
  16. }
  17. for (int i = sz-1; i >= 0; i--) {
  18. printf("%d \n", randArray[i]);
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement