C Programming Code Examples C > Mathematics Code Examples C Program to find greatest in 3 numbers C Program to find greatest in 3 numbers #include<stdio.h> int main() { int x, y, z; printf("\nEnter value of x, y & z : "); scanf("%d %d %d", &x, &y, &z); if ((x > y) && (x > z)) printf("\nx is greatest"); if ((y > z) && (y > x)) printf("\ny is greatest"); if ((z > x) && (z > y)) printf("\nz is greatest"); return(0); }