Any positive integer number can be expressed as the product of its prime factors. For example, integer number 120=2*2*2*3*5.
Write a MAIN function and two FUNCTIONS (name those FUNCTIONS any way you wish) to find the sum of the prime factors of the elements of a two-dimensinal 5X4 integer array A, and store them into a two-dimensinal 5X4 integer array B, and finally, print A and B.
Within the MAIN function:· Declare two 5X4 integer arrays A and B. · Initialize array A elements with (x+3) (x starting from 1 and incrementing by 2 for each element of array A). · Pass the array A and its dimensions (number of rows and columns) to the FUNCTON2 as arguments. Be sure that the number of rows and columns should be passed as POINTER arguments. · Pass A, B, number of rows and number of columns to the FUNCTION1 as arguments. · Pass the array B and its dimensions (number of rows and columns) to the FUNCTON2 as arguments. Be sure that the number of rows and columns should be passed as POINTER arguments.
Within the FUNCTION1:· Compute and print the prime factors of each element of array A. · Store the sum of the prime factors of each element of array A into the corresponding element of array B.
Within the FUNCTION2:
Print arrays A and B.
PS: No need to take any entry from user. For all calculations, use only the numbers that you generate in matrix A.
hy buddy how are you..
i am a software engineering student and this assignment is just a piece of cake for me... so let me do it...come on chat and we can discuss the project thanks...
Dear Employer,
I have completely read your requirement. I can take-up your task and finish it sooner. I have strong programming skills in C and C++. You can chat with me to discuss few details.
Thank you,
Sandeep
Hi gone through your project description and i can assure you that i can complete the work as soon as you want.
Please PM me if any queries i would be happy to provide you the best possible solution.
Thank You
Best Regards
Dinesh Choudhary
Hi
I am good at programming skills. I have done few embedded projects too. I can help you out. If you wish, we can speak about it later.
Thanks,
Parameshwaran
I am a C++ student and this is actually my first bid. I hope you will give me a chance. I am pretty good at programming and I can get this done efficiently.
I have completed this project.
Here is the output:
Sum of prime factor of 3 is 3
Sum of prime factor of 5 is 5
Sum of prime factor of 7 is 7
Sum of prime factor of 9 is 6
Sum of prime factor of 11 is 11
Sum of prime factor of 13 is 13
Sum of prime factor of 15 is 8
Sum of prime factor of 17 is 17
Sum of prime factor of 19 is 19
Sum of prime factor of 21 is 10
Sum of prime factor of 23 is 23
Sum of prime factor of 25 is 10
Sum of prime factor of 27 is 9
Sum of prime factor of 29 is 29
Sum of prime factor of 31 is 31
Sum of prime factor of 33 is 14
Sum of prime factor of 35 is 12
Sum of prime factor of 37 is 37
Sum of prime factor of 39 is 16
Sum of prime factor of 41 is 41
Matrix A
3 5 7 9
11 13 15 17
19 21 23 25
27 29 31 33
35 37 39 41
Matrix B
3 5 7 6
11 13 8 17
19 10 23 10
9 29 31 14
12 37 16 41
--------------------------------
Process exited after 0.03606 seconds with return value 0
Press any key to continue . . .
pick me please - you will make me win my first freelance project - Thank you