提交 863ca5e4 编写于 作者: 每日一练社区's avatar 每日一练社区

update dailycode pipline data

上级 38bdc0b3
...@@ -8,3 +8,4 @@ __pycache__ ...@@ -8,3 +8,4 @@ __pycache__
helper.py helper.py
test.md test.md
data_backup/dailycode data_backup/dailycode
test.cpp
\ No newline at end of file
...@@ -2,6 +2,36 @@ ...@@ -2,6 +2,36 @@
<p style="margin-left:.0001pt; margin-right:0">小林和小树兄弟俩相约存零钱。眼看到年底了&#xff0c;兄弟俩决定算算一共存了多少钱&#xff0c;请帮他们算出来。</p><p style="margin-left:.0001pt; margin-right:0">输入&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">两行&#xff0c;第一行三个整数分别对应元、角、分&#xff0c;表示小林存的零钱数&#xff1b;</p><p style="margin-left:.0001pt; margin-right:0">第二行三个整数分别对应元、角、分&#xff0c;表示小树存的零钱数。</p><p style="margin-left:.0001pt; margin-right:0">输出&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">两人存的钱数&#xff08;单位&#xff1a;&#xff0c;保留2位小数)</p><p style="margin-left:.0001pt; margin-right:0">样例输入&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">30 5 5</p><p style="margin-left:.0001pt; margin-right:0">45 7 4</p><p style="margin-left:.0001pt; margin-right:0">样例输出&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">76.29</p> <p style="margin-left:.0001pt; margin-right:0">小林和小树兄弟俩相约存零钱。眼看到年底了&#xff0c;兄弟俩决定算算一共存了多少钱&#xff0c;请帮他们算出来。</p><p style="margin-left:.0001pt; margin-right:0">输入&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">两行&#xff0c;第一行三个整数分别对应元、角、分&#xff0c;表示小林存的零钱数&#xff1b;</p><p style="margin-left:.0001pt; margin-right:0">第二行三个整数分别对应元、角、分&#xff0c;表示小树存的零钱数。</p><p style="margin-left:.0001pt; margin-right:0">输出&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">两人存的钱数&#xff08;单位&#xff1a;&#xff0c;保留2位小数)</p><p style="margin-left:.0001pt; margin-right:0">样例输入&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">30 5 5</p><p style="margin-left:.0001pt; margin-right:0">45 7 4</p><p style="margin-left:.0001pt; margin-right:0">样例输出&#xff1a;</p><p style="margin-left:.0001pt; margin-right:0">76.29</p>
以下程序实现了这一功能,请你填补空白处的内容:
```cpp
#include <stdio.h>
int main()
{
int y1,j1,f1,y2,j2,f2;
int y,j,f;
int shiftj = 0;
int shifty = 0;
float ss ;
scanf("%d %d %d",&y1,&j1,&f1);
scanf("%d %d %d",&y2,&j2,&f2);
f = f1 + f2;
if(f>=10)
{
f = f-10;
shiftj = 1;
}
j = j1 + j2 + shiftj;
_____________________
y = y1 + y2 + shifty;
ss = y + j/10.0 + f/100.0;
printf("%.2f\n",ss);
return 0;
}
```
## template ## template
```cpp ```cpp
...@@ -37,7 +67,11 @@ int main() ...@@ -37,7 +67,11 @@ int main()
## 答案 ## 答案
```cpp ```cpp
if(j >= 10)
{
j = j - 10;
shifty = 1;
}
``` ```
## 选项 ## 选项
...@@ -45,17 +79,27 @@ int main() ...@@ -45,17 +79,27 @@ int main()
### A ### A
```cpp ```cpp
if(j <= 10)
{
j = j + 10;
shifty = -1;
}
``` ```
### B ### B
```cpp ```cpp
if(j == 10)
{
shifty = 1;
}
``` ```
### C ### C
```cpp ```cpp
if(j >= 10)
{
shifty = 1;
}
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册