标签:console include lis content 表达式 ios input 哈哈 switch
:"表达式。并要求:
#include <iostream> int cal(int a,int b, int c){ int res = 0; (!(a^1) && (res = (b+c))) || (!(a^2) && (res = (b-c))) || (!(a^3) && (res = (b*c))) || (!(a^3) && (res = (b/c))); printf("res:%d\n", res); } int main(){ int a = 0; int b = 5; int c = 6; printf("b:5,c:6,pls input a:\n"); while (std::cin >> a) cal(a,5,6); }
标签:console include lis content 表达式 ios input 哈哈 switch
原文地址:http://www.cnblogs.com/lytwajue/p/7262686.html