برای ماشین حساب از این کد میتونید استفاده کنید
#include <stdio.h>
#include <conio.h>
#include <math.h>
main()
{
float x,y;
char op;
printf("dadeha va dastur ra vared konid :");
scanf("%f%c%f",&x,&op,&y);
switch(op)
{
case'+':printf("x+y=%f",x+y);
break;
case'-':printf("x-y=%f",x-y);
break;
case'*':printf("x*y=%f",x*y);
break;
case'/':printf("x/y=%f",x/y);
break;
default:printf("dastur morede ghabul nist.");
}
getch();
}