//Display the greatest of three using if-inside-if
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter a,b,c=");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
if(a>c)
printf("\na = %d is greatest",a);
else
printf("\nc = %d is greatest",c);
else
if(b>c)
printf("\nb = %d is greater",b);
else
printf("\nc = %d is greater",c);

return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: