C++ 实现数字与字母对应输出
#include<bits/stdc++.h> using namespace std;
int main(){ int a, b; cin >>a >>b; int c = a+b; if(c<10) cout <<c; else if(c==10) cout 'a'; else if(c==11) cout 'b'; else if(c==12) cout 'c'; else if(c==13) cout 'd'; else if(c==14) cout 'e'; else if(c==15) cout 'f'; return 0; }
原文地址: http://www.cveoy.top/t/topic/crSQ 著作权归作者所有。请勿转载和采集!