Welcome to Qi-U Community for programmer and developer-Open, Learning and Share

Categories

0 votes
508 views
in Technique[技术] by (31.9m points)

请问怎么使用c语言编程这段代码?

image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (31.9m points)

把输入的0和1加起来,得到的就是正品数,正品数再除一下一开始获取的产品总数,就得到次品率。注意最后输出浮点数要用%f。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
...