Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are given a number n that is a product of two large prime numbers, p and q. Write a C++ function to scan a
You are given a number n that is a product of two large prime numbers, p and q. Write a C++ function to scan a .txt file that has 10+ digit figures per line and find and output the prime factors p and q for each number as quickly as possible. Attached is an example of a .txt file to scan.
4852 lines (4851 sloc) 104 KB 1 2605796209 2 266582748 3 2727241729 4 2771188489 2835030001 2847758989 7 2913364501 8 2947078369 9 2981297941 10 3028508869 11 3034591009 12 3049979869 13 3095847409 14 3102585613 15 3104500681 16 3112189369 17 3167168281 18 3170523661 19 3174061717 20 3227199289 21 3258128161 Raw Blame HistoryStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started