Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Problem1: Write C++ code that sum the numbers from 1 to 100 Problem2: a. Write C++ code that sum reciprocals (1/1 + 1/2 + +
Problem1: Write C++ code that sum the numbers from 1 to 100
Problem2: a. Write C++ code that sum reciprocals (1/1 + 1/2 + + 1/99 + 1/100) b. Write C++ code that sum reciprocals (1/100 + 1/99 + ... 1/2 + 1/1) compare a and b
Problem3: a. Write C++ code that sum multiplication reciprocals (1/(1x1) + 1/(2x2) + ) b. Write C++ code that sum reciprocals (1/(100x100) + 1/(99x99) + ... )
complete the code
#include "functionSum.h" | |
using namespace std; | |
/* | |
Problem1: | |
========= | |
Write C++ code that sum the numbers from 1 to 100 | |
Problem2: | |
========= | |
a. Write C++ code that sum reciprocals (1/1 + 1/2 + + 1/99 + 1/100) | |
b. Write C++ code that sum reciprocals (1/100 + 1/99 + ... 1/2 + 1/1) | |
compare a and b | |
Problem3: | |
========= | |
a. Write C++ code that sum multiplication reciprocals (1/1*1 + 1/2*2 + ) \ | |
b. Write C++ code that sum reciprocals (1/100*100 + 1/99*99 + ... ) | |
*/ | |
int sumUpTo(int x) { | |
//write your code here | |
} | |
float sumReciprocalNormal(int x) { | |
//write your code here | |
} | |
float sumReciprocalRev(int x) { | |
//write your code here | |
} | |
float sumMysteryNormal(int x){ | |
//write your code here | |
} | |
float sumMysteryRev(int x) { | |
//write your code here | |
} |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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