题目名:成绩(无法提交)
This commit is contained in:
parent
1b9fc62755
commit
3efe13b1a7
|
@ -0,0 +1,3 @@
|
|||
# 标题
|
||||
|
||||
* 内容
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1,44 @@
|
|||
#include<iostream>
|
||||
#include<cstdio>
|
||||
#include<cstring>
|
||||
using namespace std;
|
||||
int main(){
|
||||
int qian=-1,hou=0,now;
|
||||
char tou[2000],wei[2000],a[4000];
|
||||
bool ce=0;
|
||||
while(cin>>a[++now]){
|
||||
if(ce==1){
|
||||
hou++;
|
||||
wei[hou]=a[now];
|
||||
}
|
||||
if(a[now]=='.'){
|
||||
ce=1;
|
||||
}
|
||||
if(ce==0){
|
||||
qian++;
|
||||
tou[qian]=a[now];
|
||||
}
|
||||
}
|
||||
printf("%c*",tou[0]);
|
||||
for(int j=1;j<qian;j++){
|
||||
printf("0");
|
||||
}
|
||||
for(int i=1;i<=qian;i++){
|
||||
if(tou[i]!='0'){
|
||||
printf("+%c*1",tou[i]);
|
||||
for(int j=1;j<=qian-i;j++){
|
||||
printf("0");
|
||||
}
|
||||
}
|
||||
}
|
||||
for(int i=1;i<=hou;i++){
|
||||
if(wei[i]!='0'){
|
||||
printf("+%c*0.",wei[i]);
|
||||
for(int j=1;j<=qian-i;j++){
|
||||
printf("0");
|
||||
}
|
||||
printf("1");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
999.99
|
|
@ -0,0 +1 @@
|
|||
123
|
|
@ -0,0 +1,7 @@
|
|||
## z:\Chao\src\Template\test\in.txt
|
||||
2020/03/14 ÖÜÁù 11:41:28.68
|
||||
Hello Easy C++ project!
|
||||
|
||||
-----------------------------------------------
|
||||
Process exited after 200 ms with return value 0
|
||||
|
Loading…
Reference in New Issue