fork(1) download
  1. #include <stdio.h>
  2.  
  3. void saidai(int kosuu, int data[], int *max){
  4. int counter=0;
  5. *max=data[0];
  6. do{
  7. counter=counter+1;
  8. if(*max<data[counter]) *max=data[counter];
  9. }while(counter<kosuu);
  10. return;
  11. }
  12.  
  13. int main()
  14. {
  15. int data[]={10,15,8,20,7};
  16. int max, kosuu=4;
  17. saidai(kosuu, data, &max);
  18. return(0);
  19. }
  20.  
Success #stdin #stdout 0s 5328KB
stdin
Standard input is empty
stdout
Standard output is empty