io.c 454 B

12345678910111213141516171819202122232425
  1. #include"io.h"
  2. #include<stdio.h>
  3. void OutPut(int* arr, int Arraylength)
  4. {
  5. for (int i = 0; i < Arraylength; i++)
  6. {
  7. if(arr[i]<10)
  8. {
  9. printf(" %d ", arr[i]);
  10. }
  11. else
  12. {
  13. printf("%d ", arr[i]);
  14. }
  15. }
  16. printf("\n");
  17. }
  18. void InPutArrayLength(int* Arraylength)
  19. {
  20. printf("%s","请输入您想要获得的随机数组长度:\n");
  21. scanf_s("%d",Arraylength);
  22. }