我该如何编译这个程序 [英] How do I compile this programme

查看:68
本文介绍了我该如何编译这个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:考试效率



在有多项选择题的考试中,以下是考试题型。

X1的数量一个标记问题,回答错误的负分为-1

X2个数字的两个标记问题,负分为-1和-2为一个或两个选项错误

X3数量的三个标记问题,负分为-1,-2和-3,一个,两个或所有三个选项错误

分数要求通过考试:Y

对于1,2和3标记问题,必须选择1,2和3选项。简单地说,一旦必须尝试回答所有选项的所有问题。

确定每种类型的问题破解考试所需的最低准确率。



计算必须达到11精度,打印精度达到2位数精度



输入格式:



第一行包含X1表示的一个标记问题的数量,

第二行包含由X2表示的两个标记问题的数量

第三行包含由X3表示的三个标记问题的数量

第四行包含通过Y表示的考试所需的标记数。



输出格式:



一个标记问题所需的最低准确率为80%

所需的最低准确率for two mark question is 83.33%

最低三个标记问题所需的准确率为90%





注意: - 如果通过考试所需的标记可以通过尝试而不尝试任何特定类型的问题来实现,则显示类似的消息,不需要尝试一个标记问题,所以没有分钟imum准确率适用



请参阅示例测试用例以便更好地理解。





样本输入和输出



SNo。输入输出说明

1

20

30

30

120



不需要尝试一个标记问题,因此不适用最低准确率。

两个标记问题所需的最低准确率为58.33%

三个标记问题所需的最低准确率为72.23%



如果一个问题得到满分并且有三个标记问题,则总精度可以在一个标记问题中为0



以同样的方式完成两个标记和三个标记问题

2

20

30

30

170



最低准确率一个标记问题所需的是100%

最低两个标记问题所需的准确率是100%

三个标记问题所需的最低准确率是100%



如果一个人在两个分数问题上得到满分,三个分数问题那么总准确性s在一个标记问题中应该100%通过考试。



以同样的方式完成两个分数和三个分数问题



我尝试了什么:



i尝试使用c语言但无法解决

解决方案

如何编译它?简单:

1)仔细阅读你的作业问题,并考虑它要求你做什么。

2)设计一个能够实现解决方案的系统。 />
3)对您设计的系统进行编码

4)编译代码

5)如果编译失败,请返回(3)并制作更改。

6)根据问题测试已编译的程序。

7)如果失败,请返回1,2,3和/或4。 />
8)重复实用它通过。



这是你的作业:开头的思考部分是任务的一部分!

Problem : Exam Efficiency

In an examination with multiple choice questions, the following is the exam question pattern.
X1 number of One mark questions, having negative score of -1 for answering wrong
X2 number of Two mark questions, having negative score of -1 and -2 for one or both options wrong
X3 number of Three mark questions, having negative score of -1, -2 and -3 for one, two or all three options wrong
Score Required to Pass the exam : Y
For 1,2 and 3 mark questions, 1,2 and 3 options must be selected. Simply put, once has to attempt to answer all questions against all options.
Identify the minimum accuracy rate required for each type of question to crack the exam.

Calculations must be done up to 11 precision and printing up to 2 digit precision with ceil value

Input Format:

First line contains number of one mark questions denoted by X1,
Second line contains number of two mark questions denoted by X2
Third line contains number of three mark questions denoted by X3
Fourth line contains number of marks required to pass the exam denoted by Y.

Output Format:

Minimum Accuracy rate required for one mark question is 80%
Minimum Accuracy rate required for Two mark question is 83.33%
Minimum Accuracy rate required for Three mark question is 90%


Note: - If the mark required to pass the exam can be achieved by attempting without attempting any particular type of question then show message similar to, One mark question need not be attempted, so no minimum accuracy rate applicable

See Example Test cases for better understanding.


Sample Input and Output

SNo. Input Output Explaination
1
20
30
30
120

One mark questions need not be attempted, so no minimum accuracy rate applicable.
Minimum Accuracy rate required for Two mark question is 58.33%
Minimum Accuracy rate required for Three mark question is 72.23%

If one got full marks in two marks question and three marks question then total accuracy can be 0 in one mark question

In same way it will be done for two marks and three marks question
2
20
30
30
170

Minimum Accuracy rate required for one mark question is 100%
Minimum Accuracy rate required for Two mark question is 100%
Minimum Accuracy rate required for Three mark question is 100%

If one got full marks in two marks question and three marks question then total accuracy should be 100% in one mark question to pass the exam.

In same way it will be done for two marks and three marks question

What I have tried:

i have tried using c language but am unable to solve

解决方案

How do you compile it? Simple:
1) Read your homework question carefully, and think about what it is asking you to do.
2) Design a system that will implement the solution.
3) Code the system you designed
4) Compile the code
5) If it fails to compile, go back to (3) and make changes.
6) Test the compiled program against the question.
7) If it fails, go back to 1, 2, 3, and / or 4.
8) Repeat util it passes.

This is your homework: the "thinking part" at the beginning is part of the task!


这篇关于我该如何编译这个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆