当前位置:网站首页>AcWing 607. Average 2 (implemented in C language)
AcWing 607. Average 2 (implemented in C language)
2022-06-28 11:57:00 【Q_ ming_ code】
Read three floating point numbers A,B and C Value , Corresponding to the scores of three students .
Please calculate the average score of students , among A The weight of the score is 2,B The weight of the score is 3,C The weight of the score is 5.
The value range of grades is 0 To 10 Between , And keep one decimal place .
Input format
There are three lines of input , Each row contains a floating point number , The first line means A, The second line says B, The third line says C.
Output format
The output format is MEDIA = X, among X Is the average score , The result is one decimal place .
Data range
0≤A,B,C≤10.0
#include<stdio.h>
int main()
{
float A,B,C,sum;
scanf("%f%f%f",&A,&B,&C);
sum=(A*2+B*3+C*5)/10.0;
printf("MEDIA = %.1f",sum);
return 0;
}边栏推荐
- Analyze whether there is duplicate data in the list and repeat it several times
- 纯纯大怨种!那些年被劝退的考研专业
- Mysql使用max函数查询不到最大值
- Batch will png . bmp . JPEG format pictures are converted to Jpg format picture
- Necessary for beginners PR 2021 quick start tutorial, PR green screen matting operation method
- Daily practice of C language - day 4: find the sum of all even numbers within 100
- 3. seat number
- 无法重新声明块范围变量
- Redis6 1: what problems can be solved by the introduction of NoSQL and redis?
- Use logrotate to automatically cut the website logs of the pagoda
猜你喜欢

Unity屏幕截图功能

Array method in JS 2021.09.18

How to deploy the software testing environment?

day32 js笔记 事件(上)2021.09.27

Cannot redeclare block range variables

Still using simpledateformat for time formatting? Be careful that the project collapses!

Class pattern and syntax in JS 2021.11.10

Day32 JS note event (Part 1) September 27, 2021

Chendanqi, Fang Fei, guquanquan and Li Bo won the prize, and the list of Sloan research award in 2022 was released

day37 js笔记 运动函数 2021.10.11
随机推荐
2. single digit statistics
5. Sum of N numbers
Lihongyi, machine learning 7 Conclusion
2018 joint examination of nine provinces & Merging of line segment trees
MySQL cannot query the maximum value using the max function
day30 js笔记 BOM和DOM 2021.09.24
Use logrotate to automatically cut the website logs of the pagoda
Day33 JS note event (Part 2) September 28, 2021
js中的数组方法 2021.09.18
Which programming language will attract excellent talents?
MapReduce项目案例1
Machine learning project captcha based on verification code recognition_ Trainer operation practice
The development and principle of the metacosmic system
Contract quantitative trading system development | contract quantitative app development (ready-made cases)
《运营之光3.0》全新上市——跨越时代,自我颠覆的诚意之作!
Django -- MySQL database reflects the mapping data model to models
TiDB v6.0.0 (DMR) :缓存表初试丨TiDB Book Rush
Is it safe to buy stocks and open an account on the account QR code of the CICC securities manager? Ask the great God for help
面试步骤的面试技巧
Cannot redeclare block range variables