Write a c program to find the maximum of three numbers using parameter passing?

1 answer

Answer

1003761

2026-07-10 10:10

+ Follow

#include<stdio.h> #include<conio.h>

main()

{

int a,b,c;

clrscr();

printf("enter the values of a,b,c");

scanf("%d,%d,%d",&a,&b,&c);

if(a>b)

{if (a>c)

{

printf("a is big");

}

else

{

printf("c is big");

}

}

else

{

if (b>c)

{

printf("b is big");

}

else

{

printf("c is big");

}

}

printf("a=%d/nb=%d/nc=%d",a,b,c);

getch();

}

/*or you can make it in another way*/

#include<stdio.h>

main()

{

int a,b,c;

printf("enter the values of a:");

scanf("%d",&a);

printf("enter the values of b:");

scanf("%d",&b);

printf("enter the values of c:");

scanf("%d",&c);

if(a>b)

{if (a>c)

{

printf("a is big");

}

else

{

printf("c is big");

}

}

else

{

if (b>c)

{

printf("b is big");

}

else

{

printf("c is big");

}

}

return 0;

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.