In this tutorial learn how you can write a c program to find largest among three number using binary minus operator.
The Binary minus operator requires two operands. It is used for arithmetic subtraction operations. It is normal minus used on subtraction.
C programming is a powerful general-purpose programming language. It can be used to develop software like operating systems, databases, compilers, etc.
Here is the code to find the largest among three numbers using the binary minus operator in C programming.
#include <stdio.h> //WAP to find largest among three number using binary minus operator.
int main(){
int a,b,c;
printf("Please enter three numbers:n");
scanf("%d%d%d",&a,&b,&c);
if(a-b>0 && a-c>0){
printf("%d is largest number.",a);
}
else if (b-a>0 && b-c>0){
printf("%d is largest number.",b);
}
else printf("%d is largest number.",c);
return 0;
}
This is how you can find largest among three number using binary minus operator in c programming. Comment below if you like our tutorial.