fork download
  1. #include <stdio.h>
  2. int largest(int,int,int);
  3. int main()
  4. {
  5. int big;// int p=2,q=1,r=7;
  6. big = largest(2,1,7);//largest = (p,q,r);
  7. printf("The largest no is %d",big);
  8. return 0;
  9. }
  10. int largest(int a,int b,int c)
  11. {
  12. if((a>b) && (a>c))
  13. {
  14. return a;
  15. }
  16. else if((b>a && b>c))
  17. {
  18. return b;
  19. }
  20. else
  21. {
  22. return c;
  23. }
  24.  
  25. }
  26.  
  27.  
  28.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
The largest no is 7