当前位置:网站首页>1217 supermarket coin processor
1217 supermarket coin processor
2022-07-02 01:33:00 【Zhanglilong 666】
Title Description
A coin processor is placed in front of the supermarket , It can help you change your change into a deposit slip . in application , The machine will have a corresponding device to automatically recognize and calculate the amount of your change , But now we can only do a small simulation experiment , Enter the number of each coin by yourself , Then write a program to convert it into a deposit slip .
Input requirements
Input in sequence 1 element 、5 horn 、1 The number of Dimes . Suppose you enter three integers 3 10 25, It means there is 3 individual 1 Yuan coins 、10 individual 5 Dimes and 25 individual 1 Dimes .
Output requirements
Output deposit receipt amount , Such as the input of the above example , Output is
Dollars=10
Change=50
Indicates that the integer amount on the certificate of deposit is 10 element , The change amount is 50 branch .
I.e. requirement Dollars It's shown after that ** Yuan's information ,Change What follows is ** Sub information .
sample input
3 0 10
sample output
Dollars=4 Change=0
#include<cstdio>
int main()
{
int x,y,z;
scanf("%d%d%d",&x,&y,&z);
int sum=x*10+5*y+1*z;
if(sum%10==0){
printf("Dollars=%d\nChange=%d\n",sum/10,0);
}
else
{
printf("Dollars=%d\nChange=%d\n",sum/10,(sum%10)*10);
}
}
边栏推荐
- 6-2漏洞利用-ftp不可避免的问题
- Principle of finding combinatorial number and template code
- [image enhancement] vascular image enhancement based on frangi filter with matlab code
- I Brief introduction of radio energy transmission technology
- 三分钟学会基础k线图知识
- ECS project deployment
- Matlab uses resample to complete resampling
- Learn about servlets
- SAP ui5 beginner tutorial 20 - explanation of expression binding usage of SAP ui5
- uTools
猜你喜欢
Principle of finding combinatorial number and template code
Liteos learning - first knowledge of development environment
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
matlab 实现语音信号重采样和归一化,并播放比对效果
[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production
城市选择器组件实现原理
三分钟学会基础k线图知识
现货黄金分析的技巧有什么呢?
游戏思考15:全区全服和分区分服的思考
Matlab uses resample to complete resampling
随机推荐
Principle of finding combinatorial number and template code
企业应该选择无服务器计算吗?
Edge extraction edges based on Halcon learning_ image. Hdev routine
What is commercial endowment insurance? Is commercial endowment insurance safe?
Unity AssetBundle subcontracting
游戏思考15:全区全服和分区分服的思考
Error creating bean with name ‘stringRedisTemplate‘ defined in class path re
关于ASP.NET CORE使用DateTime日期类型参数的一个小细节
[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production
SAP ui5 beginner tutorial 20 - explanation of expression binding usage of SAP ui5
Introduction to ffmpeg Lib
SAP ui5 beginner tutorial XXI - trial version of custom formatter of SAP ui5
机器学习基本概念
Raspberry pie 4B learning notes - IO communication (1-wire)
ECS project deployment
Architecture evolution from MVC to DDD
Laravel artisan 常用命令
GL Studio 5 安装与体验
Load and domcontentloaded in JS
Have you stepped on the nine common pits in the e-commerce system?