Question: Pleazzzzzze solve it soon. use c++ max. runtime is 2 seconds Parta) The program will read in a non-negative integer which fits in a 32bit

Pleazzzzzze solve it soon.

Pleazzzzzze solve it soon. use c++ max. runtime is 2 seconds Parta)

use c++ max. runtime is 2 seconds Parta) The program will read in a non-negative integer which fits in a 32bit integer. The input is guaranteed to be correct. No error checking is needed. The program needs to report whether the input is a prime, and whether the input is an s-prime respectively. (See sample test cases) For information, PASS enforces a maximum runtime of 2000ms (i.e. 2 seconds) per test case. If the program takes longer than that, it will result in "Time Limit Exceeded" error and the program will not score any mark for that test case. Sample Input/Output: Example 1: (User Input is underlined) Input an integer: 12 12 is not Prime 12 (sum=3) is not s-Prime Example 2: (User Input is underlined) Input an integer: 13 13 is Prime 13 (sum=4) is not s-Prime Example 3: (User Input is underlined) Input an integer: 23 23 is Prime 23 (sum=5) is s-Prime Example 4: (User Input is underlined) Input an integer: 2147000117 2147000117 is Prime 2147000117 (sum-23) is s-Prime

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!