The program may run as follows:
Input a month (YYYY.MM) -- 2014.11
The first day of 2014.11 is Saturday.
Input a month (YYYY.MM) -- 2014.1
The first day of 2014.1 is Wednesday.
Input a month (YYYY.MM) -- 2014.12
The first day of 2014.12 is Monday.
|
A positive whole number n > 2 is prime if no number between 2 and sqrt(n) (inclusive) evenly divides n. Write a program that accepts a value of n as input and determines if the value is prime. If n is not prime, your program should quit as soon as it finds a value that evenly divides n.
The program may run as follows.
Please input a positive number -- 9
9 is not a prime number.
Input a number -- 22
1:1
2:2
3:8
4:3
5:6
6:9
7:17
8:4
9:20
10:7
11:15
12:10
13:10
14:18
15:18
16:5
17:13
18:21
19:21
20:8
21:8
22:16
new_g = (g - T) * (UB - 75) / (max - T) + 75
, where max is the maximum grade among all students, and UB is the upper-bound specified by the instructor for the adjusted grades. If the instructor decides that the highest grade in this class can be 100, he may let UB be 100. However, if the whole class does not work hard, the instructor may decide that UB can only be 89.max
, her adjusted grade will be 100. If Danny's grade is equal to T
, his adjusted grade will be 75.Your program may run as follows:
Please type the filename of student grades -- grade.txt
The maximum grade is 96
The average grade is 41.6
What would be the threshold to pass? 45
What would be the upper-bound of adjusted grades? 100
Please type a new filename to store adjusted grades -- new_grade.txt