Question: Programming Part 2: Write a program in C or Java that takes the integer 1 billion (1,000,000,000) from the command line or from user input.

 Programming Part 2: Write a program in C or Java that

Programming Part 2: Write a program in C or Java that takes the integer 1 billion (1,000,000,000) from the command line or from user input. Once the data is input then the program should perform the following operations: 1. Find incremental sum of all the numbers until and including 1,000,000,000 2. Find incremental sum of all the even numbers until and including 1,000,000,000 3. Display the sum of all the numbers until and including 1,000,000,000 4. Displays the sum of all the even numbers until and including 1,000,000,000 5. Calculates the following: o sum of all the numbers in Step 1/ sum of all the numbers in Step 2 6. Displays the result of above calculation Analysis Part 2: Analyze the time taken by the program to complete, e.g., review the usage of cores using Activity Monitor program in Ubuntu and find a way to monitor the time taken by the program to complete its execution. Please do not forget to take a screenshot of the Activity Monitor

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!