I'm trying to make a calculator program for my class (not fully completed as you can tell) and I'm running into a problem with the Multiplication and Division section. They both print out 0 instead of their intended value, but Addition and Subtraction work fine. Any help?
int choice = 8;
double numberone;
double numbertwo;
while(choice > 7 || choice < 1){
printf("(1) Addition \n(2) Subtraction \n(3) Multiplication \n(4) Division \n(5) Modulus (integers only) \n(6) Test if prime (integers only) \n(7) Exit \nPlease choose an operation: \n");
scanf(" %i", &choice);
if (choice != 5 || choice!= 6){
printf("Enter the first number: ");
scanf(" %d", &numberone);
printf("Enter the second number: ");
scanf(" %d", &numbertwo);
if (choice == 1){
double sum = numberone + numbertwo;
printf("Sum: %d", sum);
}
else if (choice == 2){
double dif = numberone - numbertwo;
printf("Difference: %d", dif);
}
else if (choice == 3){
double pro = numberone * numbertwo;
printf("Product: %d", pro);
}
else if (choice == 4){
double quo = numberone / numbertwo;
printf("Quotient: %d", quo);
}
}
}
}