Question: c++ Write a C++ Program that can be use to determine if the following proposition is true 1731 is a prime number Hint and information:

c++
c++ Write a C++ Program that can be use to determine if

Write a C++ Program that can be use to determine if the following proposition is true "1731 is a prime number" Hint and information: A prime number is a number that can not be divided by any number except 1 and the number itself. For example 7 is a prime number. It is easy to tell if a small number is a prime or not, but for a large number, we may need either a specific mathematical process or a computer program to help us to find out. In this assignment, if we would like to find out if 1731 is a prime number, we may need to write a C++ program to do so. What we need to do is to use a loop statement to check all the numbers between 1 and 1731 to see if there is any number in the range that can divide into 1731 besides 1 and 1731 . How to check if a number n can divide into 1731? Use modular division operator %:(m%n= the remainder) if (1731%n=0) then n can divide into 1731 , otherwise it can not. We do not have to check 1 and 1731 , so we use a loop to check all the numbers from 2, 3, 4, we don't have to go all the way to 1730 , we can only check all the numbers up to 41 . We can mathematically prove if there is no number between 2 and 41 that can divide into 1731 , then 1731 is a prime. Please enter yes or no in the Text Entry and upload the source file of your program

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!