0
Can someone please help me making a program that takes two values(int) identify which is smaller and add 1 in it and show it?
In c++ using ternary operator
5 Respuestas
+ 1
int a,b;
cin >> a >> b;
int small = a<b?a:b;
cout << small+1 << endl;
0
Thank you
0
Learn the concept well before you attempt a problem.
0
I knew what to do I just was confused in writing a code identifying the smaller value
0
Being happy with being 'confused' and asking other people to solve your practice task will only accomplish one thing:
You won't learn how to program.