Fruit bowl problem
Iām solving this problem in c++, and thereās something that i donāt get. It says you have an even amount of fruit, half apples, and half bananas. When coding, i tried to add an āifā function, so that if the amount of fruit was odd, you couldnāt solve it because technically you canāt have an odd number of fruit in this problem, and in case the hypothetical user of this program tried to input an odd number, the program would tell them that. But it gave me trouble when solving, said three of the 5 answers were wrong (possibly because they had used odd numbers and my program was just saying it couldnāt be). However when i took that condition out, the program worked fine. Does that mean we have to overlook the info given in the problem?