Welcome back to the Intro. to Programming Workshops! This week's workshop will focus on problem solving!
The PokeVentures game code now has a new home on GitHub, you can find the new home in the resources section below!
The latest edition now includes multiplayer and in-game chat!
- PokeVentures Source Code - http://github.com/Latiosu/pokeventures
- Solution to Integral question - Dropbox link
- If you have any queries or comments, feel free to send me an email at: email@example.com
Write a program that calculates the integral (area under graph) for f(x)=x^3 that receives input for the interval (a, b) and number of sub-intervals (n).
The program should also ask for the method for calculating the integral out of the following options:
Additionally, note the following:
- You must implement both methods in your program
- You may assume that all input is valid
- a and b are of type double
- n is of type int
Please enter the interval (a, b) and sub-intervals (n): 3.0 5.0 12 Type 'r' for Rectangle method or 't' for Trapezoidal method: t The answer is 136.1111
Please enter the interval (a, b) and sub-intervals (n): 0 144 1 Type 'r' for Rectangle method or 't' for Trapezoidal method: r The answer is 0
Located under the Resources heading!