Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions