Question: Input Two integer numbers N and M are given. (0

Input

Two integer numbers N and M are given. (0

The input must be received from the file input in input.txt. Output

Print two integers A and B to output.txt

A : The sum of all prime numbers from the Nth prime number to the Mth prime number B : The remainder of (the product of all prime numbers from Nth prime number to Mth prime number/ M)

For example, if N = 3 and M = 6,

A : 5 + 7 + 11 + 13 = 36

B : (5*7*11*13) mod 6 = 1

Example

Input Input.txt 3 6

Output Output.txt 36 1

Please help me. (in c++ language)

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!