Social Icons

twitterfacebookgoogle pluslinkedinrss feedemail

Monday, August 27, 2012

BUBTPC 2nd Problem D - Calculate the Percentage



Calculate the Percentage

Problem Description:
Rakib and the other students in his class find the programming class boring because their teacher can not make the programming class interesting. Now all the students in the class want to do something about programming class teacher. Never the less they are agree to learn programming with much interest and this leads them to write an application to their head of the department to change their teacher, Moreover most of the students failed in the last programming exam. But to write that application, they need to write the percentage of failure in the application. As they are not good in programming they don’t know how to calculate the percentage. So they have come to you to write a computer program to calculate the percentage of the students failed in the exam.

Input:
The first line of input contains one number N (2<=N<=1000) which is the number of students in the class and the second line contains M (30<=M<=70). M is the mark to pass the exam. Next line will contain N space separated integers within 0 to 100 denoting the obtained mark of N students in the exam.

Output:
For the given input you need to output the percentage of students failed in the exam.  See the sample output for more details.

Sample Input/Output:
Sample Input
Sample Output
4  
45
20 60 40 10

5  
40
85   75   35   50   38
Percentage of students fail to pass the exam: 75



Percentage of students fail to pass the exam: 40


 
Problem setter: Abu Obaida Opu, Dept. of CSE 
Bangladesh University of Business and Technology (BUBT)

No comments:

Post a Comment

 

Sample text

Sample Text