fork download
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,b,c;
  6. printf("Enter the value of \na b c:> \n");
  7. scanf("%d%d%d",&a,&b,&c);
  8. if((b<a&&b>c)|(b>a&&b<c))
  9. printf("%d is the 2nd max",b);
  10.  
  11. else if((c<a&&c>b)|(c>a&&c<b))
  12. printf("%d is the 2nd max",c);
  13. else
  14. printf("%d is the 2nd max",a);
  15.  
  16. return 0;
  17.  
  18. }
  19.  
Success #stdin #stdout 0s 2172KB
stdin
Standard input is empty
stdout
Enter the value of 
a b c:> 
-6490276 is the 2nd max