x=raw_input(">"); y=raw_input(">"); z=raw_input(">"); x=int(x); y=int(y); z=int(z); if (x!=y!=z): a=int(x)+int(y)+int(z); printNow(a); if (x==y and x!=z and y!=z): b=int(x)+int(z) printNow(B)/>; if (x==z and x!=y and y!=z): c=int(y)+int(x); printNow(c);
so my assignment is to make a program that you enter 3 numbers and they have to be added together, but the none of the 3 numbers can be the same as each other. i was expecting for the bottom section
if (x==z and x!=y and y!=z): c=int(y)+int(x); printNow(c);to give me a 3 if x=1 y=2 and z=1, which it does but it gives me a 4 then a line below a 3. why is this? i dont know where the 4 comes from and i dont want it there. help would be appreciated!