Conditional Operator In C programming
Q. WaP to find the smallest or biggest number among three numbers by taking numbers from user.
source code:
//wap to find the biggest number between three number
#include<iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
(a<b && a<c)?cout<<a:(b<a && b<c)?cout<<b:cout<<c;
return 0;
}
find pdf for Operators in C : here
ConversionConversion EmoticonEmoticon