nodejs 位运算 开关
include<iostream.h>
#include<conio.h>
#include<conio.h>
void main()
{ clrscr();
int a,b;
char c;
cout<<“Enter any expression(ex:3*7):”;
cin>>a>>c>>b;
switch(c)
{
case’+’: cout<<“nResult:”<<a+b;
break;
case’-‘: cout<<“nResult:”<<a-b;
break;
case’*’: cout<<“nResult:”<<a*b;
break;
case’/’: cout<<“nResult:”<<a/b;
break;
case’%’: cout<<“nResult:”<<a%b;
break;
}
getch();
}
翻译自: https://www.thecrazyprogrammer.com/2011/03/c-program-to-do-arithmatic-operations.html
nodejs 位运算 开关