Originally Posted by
jason07
Help me up with the 1st part pls...i hv try it not works...
not i dun wan to do it...but dunno...so i ask for ur help...
thanks a millions....
I assumed you could fix it yourself after seeing that much. Are you self-teaching yourself? or is this homework - what it looks like.
use this while statement instead:
Code:
while((ans != 'N' || ans != 'n') && (ans == 'y' || ans =='Y'))
What its doing there is the while statement will continue if the answer choice is not 'n' or 'N', and will continue if its 'y' or 'Y'.
and look at your if and else statements, it should be
The reason is because it was printing out the else statement if you happened to enter 12. There rest would follow that trend also:
Code:
if (ISDN==12) {
}
else if (ISDN==98) {
}
else if (ISDN==34) {
}
else if (ISDN==43) {
}
else if (ISDN==74) {
}
else {
//this is only printed if none of the above are chosen
}
Read what I write, try to understand whats going on before messing around with it not knowing what you're doing, or go study more.