题解 | 简单运算
#include <iostream> using namespace std; template<typename t> void sum(t a,t b) { if(a>b){ printf("%d ",a+b); printf("%d ",a-b); printf("%d ",a*b); printf("%d ",a/b); printf("%d",a%b); } else { printf("%d ",a+b); printf("%d ",b-a); printf("%d ",a*b); printf("%d ",b/a); printf("%d",b%a); } } int main() { // write your code here...... int a,b; scanf("%d\n %d\n",&a,&b); sum(a,b); return 0; }