/*Write a program in C to find the maximum of three integers*/ //Using a fourth variable => Preffered #include int main () { int a, b, c, max=0; printf ("\nEnter the three numbers: "); scanf ("%d %d %d", &a, &b, &c); if (a>max) max=a; //stores the highest value in max if (b>max) //do not use else if, reason: next comment max=b; if (c>max) //else if => wouldn't check further cond. if satisfied max=c; printf("\n%d is the largest number", max); return 0; }