Here Is The Complete C Programming Code For Working Calculator.
#include<stdio.h> int main() { int a, b; char op; float result; printf("Enter First Number:"); scanf("%d", &a); printf("Enter Second Number:"); scanf("%d", &b); printf("Enter Operater What Do You Want:"); scanf(" %c", &op); switch (op) { case '+': result=a+b; printf("The Sum Is %f", result); break; case '-': result=a-b; printf("The Subtract Is %f", result); break; case '*': result=a*b; printf("The Multiply Is %f", result); break; case '/': result=a/b; printf("The Division Is %f", result); break; default: printf("Please Enter Envalid Operater"); break; } }
Top comments (1)
💯
Some comments may only be visible to logged-in visitors. Sign in to view all comments.