update 2024/10/3
This commit is contained in:
parent
fb3ec35fdf
commit
2684d8e9df
26
l.cpp
Normal file
26
l.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include<iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
int number,ge,shi,bai;
|
||||||
|
cin >>number;
|
||||||
|
ge = number%10;
|
||||||
|
shi = number/10%10;
|
||||||
|
bai = number / 100;
|
||||||
|
number = ge*100 + shi*10 + bai;
|
||||||
|
cout << number<<endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int qian(){
|
||||||
|
int number1,ge1,shi1,bai1,qian1;
|
||||||
|
cin >>number1;
|
||||||
|
ge1 = number1 % 10;
|
||||||
|
shi1 = number1 / 10 % 10;
|
||||||
|
bai1 = number1 / 100 % 10;
|
||||||
|
qian1 = number1 /1000;
|
||||||
|
number1 = ge1*1000 + shi1*100 + bai1 *10 + qian1;
|
||||||
|
cout <<number1;
|
||||||
|
return 0;
|
||||||
|
}
|
BIN
test.exe → l.exe
BIN
test.exe → l.exe
Binary file not shown.
7
test.cpp
7
test.cpp
@ -3,10 +3,9 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
int gc,f,gp;
|
int gc=11,f=25,gp=25;
|
||||||
gc = 11;
|
f+=gc;
|
||||||
f = gc+25;
|
gp+=f;
|
||||||
gp = f+25;
|
|
||||||
cout <<"格小C岁数:"<<gc<<endl;
|
cout <<"格小C岁数:"<<gc<<endl;
|
||||||
cout <<"格小C爸爸岁数:"<<f<<endl;
|
cout <<"格小C爸爸岁数:"<<f<<endl;
|
||||||
cout <<"格小C爷爷岁数:"<<gp<<endl;
|
cout <<"格小C爷爷岁数:"<<gp<<endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user