当前位置:网站首页>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);
}
}边栏推荐
- Laravel artisan 常用命令
- CTF daily question day45 sensor
- Self drawing of menu items and CListBox items
- GL Studio 5 安装与体验
- Liteos learning - first knowledge of development environment
- SAP ui5 beginner tutorial 20 - explanation of expression binding usage of SAP ui5
- II Basic structure of radio energy transmission system
- I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
- k线图形态这样记(口诀篇)
- 站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
猜你喜欢

首场“移动云杯”空宣会,期待与开发者一起共创算网新世界!

What are the skills of spot gold analysis?

matlab 使用 resample 完成重采样

遊戲思考15:全區全服和分區分服的思考

Exclusive delivery of secret script move disassembly (the first time)

Leetcode, 3 repeatless longest subsequence
![[IVX junior engineer training course 10 papers to get certificates] 01 learn about IVX and complete the New Year greeting card](/img/99/53b0ae47bada8b0d4db30d0517fe3d.jpg)
[IVX junior engineer training course 10 papers to get certificates] 01 learn about IVX and complete the New Year greeting card
![[disease detection] realize lung cancer detection system based on BP neural network, including GUI interface](/img/c9/3fe8693629a8452dcfdb4349ddee0d.png)
[disease detection] realize lung cancer detection system based on BP neural network, including GUI interface

Memorabilia of domestic database in June 2022

Sql--- related transactions
随机推荐
Raspberry pie 4B learning notes - IO communication (1-wire)
Load and domcontentloaded in JS
II Basic structure of radio energy transmission system
Architecture evolution from MVC to DDD
Study note 2 -- definition and value of high-precision map
2022年6月国产数据库大事记
What are the affordable Bluetooth headsets? Student party parity Bluetooth headset recommendation
VARIATIONAL IMAGE COMPRESSION WITH A SCALE HYPERPRIOR文献实验复现
机器学习基本概念
I'll teach you to visit Amazon RDS for a year and build a MySQL cloud database (only 10 minutes, really fragrant)
[image enhancement] vascular image enhancement based on frangi filter with matlab code
Sql--- related transactions
Matlab uses audiorecorder and recordblocking to record sound, play to play sound, and audiobook to save sound
成功实现边缘编码需要了解的六大经验教训
Design and control of multi rotor aircraft (VII) -- sensor calibration and measurement model
[IVX junior engineer training course 10 papers] 02 numerical binding and adaptive website production
Hcip day 14 (MPLS protocol)
Basic usage of three JS high-order functions --filter---map---reduce
Penser au jeu 15: penser au service complet et au sous - service
电商系统中常见的9大坑,你踩过没?