当前位置:网站首页>Zzuli:1044 failure rate
Zzuli:1044 failure rate
2022-07-03 14:34:00 【Snake_____】
Title Description
Input n and n Students' grades ( The set of real Numbers ), Output failure rate .
Input
The first line of input is an integer n, The second line is n A real number , Space off .
Output
Output a real number , Indicates the failure rate , The result is reserved 2 Decimal place , Take a line alone .
The sample input Copy
8 98 45 86 79 56 75 90 70
Sample output Copy
0.25
Tips
Be careful , The failure rate is 0 when , Output 0.00
#include <stdio.h>
int main()
{
int i;
double w,x,p=0,sump=0;
scanf("%lf",&sump);
for(i=0;i<sump;i++)
{
scanf("%lf",&x);
if(x<60)
{
p=p+1;
}
}
w=p/sump;
printf("%.2lf",w);
return 0;
}
边栏推荐
猜你喜欢
Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
Tonybot Humanoïde Robot Infrared Remote play 0630
Concat and concat_ Ws() differences and groups_ Use of concat() and repeat() functions
7-15 calculation of PI
Programming language: the essence of type system
Tonybot humanoid robot starts for the first time 0630
分布式事务(Seata) 四大模式详解
Mysql多表查询 #子查询
【北大青鸟昌平校区】互联网行业中,哪些岗位越老越吃香?
洛谷P5018 [NOIP2018 普及组] 对称二叉树 题解
随机推荐
Thread.sleep和TimeUnit.SECONDS.sleep的区别
x86汇编语言-从实模式到保护模式 笔记
7-6 mixed type data format input
一文了解微分段应用场景与实现机制
7-10 stack of hats (25 points) (C language solution)
Add ZABBIX calculation type itemcalculated items
Thread. Sleep and timeunit SECONDS. The difference between sleep
适用于XP的DDK
PCB中常用快捷键
Preliminary summary of structure
Protobuf and grpc
Tonybot Humanoïde Robot Infrared Remote play 0630
Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
adc128s022 ADC verilog设计实现
泰凌冲刺科创板:拟募资13亿 国家大基金与小米长江是股东
tonybot 人形机器人 定距移动 代码编写玩法
Why is this error reported when modifying records in the database
如何查询淘宝天猫的宝贝类目
必贝特医药冲刺科创板:年营收97万亏损1.37亿 拟募资20亿
Niuke: crossing the river