/* Calculator */ #include #include int main() { int sel,n1,n2; printf("Enter 2 nos"); scanf("%d %d",&n1,&n2); do{ printf("1:Add\n2:Subtract\n3:Exit\n"); scanf("%d",&sel); if(sel==1) printf("Ans=%d\n",n1+n2); if(sel==2) printf("Ans=%d\n",n1-n2); }while(sel!=3); }