//find maximum number among three integers
#include<stdio.h>
main()
{
int n1,n2,n3,max; //Declaration of variables
printf("Enter any three integers:\n");
scanf("%d%d%d",&n1,&n2,&n3);// Read three numbers from user
if(n1>n2) //let(condition 1)
{
if(n1>n3)//let (condition 2)
{
max=n1;} //if condition 1 and 2 are true then n1 is maximum
else{
max=n3; //if condition 1 is true but condition 2 is not...
Subscribe
For New Post Notifications