Greatest of 3 number

can we write if if else
instead of if else if

hello @Ds_aizen
i cannot comment anything without code.
so pls share the code that ur refering

#include using namespace std; int main() { int a, b ,c; cin>>a>>b>>c; if(a>b && a>c){ cout<<“A”<<" “; }else if(b>a && b>c){ cout<<“B”<<” "; }else{ cout<<“C”; } return 0; }

yeah u can use if - if - if
in place of if -else if -else

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.