Homework Statement
I'm making a program in C++ to take an image in .ppm format and either create its inverse or binary threshold.
2. The attempt at a solution
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstdlib> //for exit()
#include <string>
#include...
Thanks!
So, let's say I have this array filled with random integers ranging from [0,200]. How do I implement a linear search?
From what I can find I understand that you'd have to set it up something like this:
int m;
(m>=0 && m<=R)
int n;
(n>=0 && n<=C)
if (A[i]==m)
{...
Homework Statement
1. Create a 2D array, A[10][10], of 100 integers.
2. Ask the user for two integers R and C where 0 < R ( 10 and 0 < C ( 10.
3. Using nested loops, fill every element A[i][j] (where 0 ( i < R and 0 ( j < C) with
random numbers ranging in [0, 200]. I will describe how to...
How do I multiply power series?
Homework Statement
Find the power series:
e^x arctan(x)
Homework Equations
e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}
arctan(x) = 0 + x - \frac{x^3}{3} + \frac{x^5}{5} - \frac{x^7}{7}
The Attempt at a Solution
So do I multiply 1 by 0, x by...
I believe I'm right in my method here, although I didn't do to well in kinematics:
PE=mgh
KE= 1/2mv^2
At the start you only have PE since velocity=0. When you fly off you have both PE and KE
So due the conservation of energy we have:
PE(i)+KE(i)=PE(f)+KE(f)
Furthermore...
You need to design a 0.9 A fuse that "blows" if the current exceeds 0.9 A. The fuse material in your stockroom melts at a current density of 540 A/cm2. What diameter wire of this material will do the job?
540x10^-2=5.40 A/m^2
5.40= .9/x
Solving for x gives the answer: .166666666666667...