简单的C++题
作者:互联网
#include <iostream>
using namespace std;
int main(){
int a;//四位数字
cin>>a;
int gw,sw,bw,qw;
gw=a%10;
sw=a%100/10;
bw=a/100%10;
qw=a/1000;
gw=(gw+5)%10;
sw=(sw+5)%10;
bw=(bw+5)%10;
qw=(qw+5)%10;
cout<<qw<<" "<<bw<<" "<<sw<<" "<<gw<<endl;
cout<<gw*1000+sw*100+bw*10+qw;
return 0;
}
标签:gw,10,qw,int,sw,C++,bw,简单 来源: https://blog.csdn.net/weixin_47834105/article/details/123607365