Maximum of three number program in C

C program to find the maximum of Three number in C Programming Language.

Variables used in this Program:

num1,num2,num3 : Integers

C Program to find Maximum of three number

#include<stdio.h>
int main()
{
int num1,num2,num3;
scanf("%d",&num1);
scanf("%d",&num2);
scanf("%d",&cnum3;
if(num1>num2&&num1>num3)
{
printf("%d is the maximum number",num1);
}
else if(num2>num1&&num2>num3)
{
printf("%d is the maximum number",num2);
}
else
{
printf("%d is the maximum number",num3);
}
return 0;
}

The above program is just a sample program you can write a program to find the maximum of N numbers. Have fun with coding.]]>

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart