Header Ads Widget

C program to find the maximum between two numbers

 C program to find the maximum between two numbers

Given two numbers , write a program to find the maximum between both numbers .

Sample input:

5 4

Sample output:

5  is maximum

C program to find the maximum between two numbers

The objective of the code is to find the maximum between two numbers .

Code(C):-

#include<stdio.h>
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a>b)
printf("%d is maximum",a);
else
printf("%d is maximum ",b);
}

Output:-

5
4
5 is maximum

Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-