fork download
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. int najwieksza(int n ,int t[]){
  6. if(n==1)return t[0];
  7.  
  8. else{
  9.  
  10.  
  11. if (t[n-1]>t[n]) return najwieksza(n-1,t);
  12. else{
  13. t[n-1]=t[n] ;
  14. return najwieksza (n,t);
  15. }
  16.  
  17. }
  18. }
  19. int main(void){
  20. int a[3]={9,8,7};
  21. int w=najwieksza(3,a);
  22. printf ("%d",w);
  23.  
  24. return 0;
  25.  
  26. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
9