C Tutorial
#include<stdio.h> void main() { float a, b, c; printf("Enter input three values\n"); scanf("%f %f %f", &a, &b, &c); printf("\nLargest value is "); if(a>b && a>c) { printf("%f\n", a); } else if(b>a && b>c) { printf("%f\n", b); } else { printf("%f\n", c); } }Output:
$ cc largest-of-three-values.c $ ./a.out Enter input three values 2 7 3 Largest value is 7.000000
C Tutorial
Privacy Policy | Copyright2020 - All Rights Reserved. | Contact us
| Report website issues in Github
| Facebook page
| Google+ page