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