Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include "pch.h"
  2. #include <malloc.h>
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6.  
  7. int main()
  8. {
  9. int i, j = 0, n, ch, x, count = 0, min = INT_MAX;
  10. int *M;
  11. printf("Enter count of numbers: ");
  12. scanf_s("%d", &n);
  13. M = (int*)malloc((n + n / 5) * sizeof(int));
  14. for (i = 0; i < n; i++) {
  15. min = INT_MAX;
  16. scanf_s("%d", &M[i]);
  17. min = M[i] < min ? M[i] : min;
  18. ch++;
  19. if (ch == 5)
  20. {
  21. i++;
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement