Accept 3 integers as input and find the sum obtained by adding the first number with the greater out of the two remaining values.

#include <stdio.h>

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

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

sum = x + (y > z ? y : z);

printf("\nSum is %d", sum);


return 0;
}

No comments:

Post a Comment

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

......from.admin