Determine the greatest of three numbers.

#include <stdio.h>

int main(void)
{
int x, y, z, res;

printf("\nEnter three numbers : ");
scanf("%d%d%d", &x, &y, &z);

res = x > y ? (x > z ? x : z) : (y > z ? y : z);

printf("\n%d is the greatest", res);


return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin