this is a simple program to run your exercice,hope that will be hopful for you
#include <stdio.h>
void main() {
char opt;
int num1,num2;
printf("Enter the first Integer: ");
scanf("%d",&num1);
printf("Enter the second Integer: ");
scanf("%d",&num2);
printf("\nInput your option :\n");
printf("(+) Addition.\n(-) Substraction.\n(*) Multiplication.\n(/) Division.\n(E) Exit.\n");
scanf("%s",&opt);
if(opt='+')
printf("The Addition of %d and %d is: %d\n",num1,num2,num1+num2);
exit(0) ;
if(opt='-')
printf("The Substraction of %d and %d is: %d\n",num1,num2,num1-num2);
exit(0) ;
if(opt='*')
printf("The Multiplication of %d and %d is: %d\n",num1,num2,num1*num2);
exit(0) ;
if(opt='/'){
if(num2==0) {
printf("The second integer is zero. Devide by zero.\n");
exit(1) ;
} else {
printf("The Division of %d and %d is : %d\n",num1,num2,num1/num2);
exit(0) ;
}
}
if(opt='E')
printf("exit");
exit(1) ;
}