Hi Guys and Galz! I want to make software in C++ which take the two values (input) from the user and tell us in the result that which value is greater using "if" Function. Plzz help Me
int a,b; scanf("%d%d",&a,&b); printf(a>b?"a is greater":"b is greater"); but try to do yourself..........
Break it down for him, this is clearly a beginner C++ homework question. Create 2 variables for the 2 values the user inputs. Ask user to input first value, set 1st var = the input. Ask user to input second value, set 2nd var = the input. Then simply: If the 1stvar is greater then 2nd cout "1stvar is bigger" if the 2nd var is greater then 1st cout "2ns var is bigger" if the 1st = 2nd cout "they are equal"