Question: please add the option of the code!!!! 1.program start with 5 digit ramdom number . it means program doesnt need scanf; 2. impliment test with

please add the option of the code!!!!

1.program start with 5 digit ramdom number . it means program doesnt need scanf;

2. impliment test with random number that come out of (1.) and printf prime number which is passed the test >>>>printf 10 prime number and pause.

-------------------------------------------------------------------------------------------------------------------

#include #include #include #include using namespace std; long long modulo(long long base, long long expn, long long mod) { long long x = 1; long long y = base; while(expn > 0) { if(expn % 2 == 1) x = (x * y) % mod; y = (y * y) % mod; expn = expn/2; } return x % mod; } int cal_Jacobian(long long a, long long n) { if(!a) { return 0; } int res = 1; long long temp; if(a < 0) { a = -a; if(n % 4 == 3) res = -res; } if(a == 1) return res; while(a) { if(a < 0) { a = -a; if(n % 4 == 3) res = -res; } while(a % 2 == 0) { a = a / 2; if(n % 8 == 3|| n % 8 == 5) res = -res; } swap(a, n); if(a % 4 == 3 && n % 4==3) res = -res; a = a % n; if(a > n /2) a = a - n; } if(n == 1) return res; return 0; } bool Strassen(long long p, int ite) { if(p < 2) return false; if(p != 2 && p % 2 == 0) return false; for(int i =0; i

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!