Monday, May 24, 2010

Programming using C++?

how do i write a program for this:





a program that reads in the coordinates of three points on a two-dimensional surface (a plane). Each point has an x-coordinate and a y- coordinate. Each point is given on a line by itself.


Thus your program's input will be something like:


------------------------------------


5.0 5.0


6.0 6.0


7.0 7.0


------------------------------------


The program computes the total distance involved in traveling from the first point (in this case 5.0,5.0) to the second point (6.0,6.0)


to the third point (7.0,7.0 in this case). It displays this distance on a single line:


------------------------------------


2.82843


------------------------------------








I need this asap (C++ programming file.. like one that produces the letter G,





#include %26lt;iostream%26gt;


using namespace std;





int main() {


cout %26lt;%26lt; "G";


return 0;


}





thanks in advance)

Programming using C++?
Okay, so currently the sum total of your programming abilities is to print a single letter to standard output. Frankly, the market for this skill is pretty thin.





I'd suggest doing this assignment yourself, and working on your problem solving skills. I'll give you one tip, though. The distance between two points in the plane is computed as





sqrt( (x0 - x1)^2 + (y0 - y1)^2 )





You'll have to turn that into valid C++, but once you get that working, the rest of the program should be very easy.





If you can't solve it, you may want to reconsider your choice of careers.
Reply:How much will you pay me for this?


No comments:

Post a Comment