i want to write a program to add the digits of a 5 digit number, using only the "if statement" without the "else" part. Is is possible?
Last edited on
I'm not even sure you'd need 'if' at all for the program he's describing.
Summing digits doesn't really require any conditional logic.
thats true -- you dont need conditional logic for that. but the project is to solve using only if statements.
Last edited on