Saturday, May 22, 2010

C++ project, really hard for me. about Square root?

if anyone answers this question exactly then they get 10 points.





my question is that i have to write a program that returns the square root of a number as a multiplier and a square root. i mean like if someone enters 45 then i should be able to cout%26lt;%26lt;"square root of %26lt;%26lt;num%26lt;%26lt;"times the square root of(i need to put a 5 here but how) "; i already know about the sqrt function.





this is what i got so far.





#include %26lt;math.h%26gt;........other includes are included.


main()


{


int num;





cout%26lt;%26lt;"Enter number to be square rooted: ";


cin%26gt;%26gt;num;





cout%26lt;%26lt;"The number square rooted is "%26lt;%26lt;sqrt(num);


}

C++ project, really hard for me. about Square root?
Yah, you want someone to do your homework for you. How freaking lame can you get.
Reply:cout %26lt;%26lt; "The squareroot of " %26lt;%26lt; num %26lt;%26lt; " is " %26lt;%26lt; sqrt(num) %26lt;%26lt; endl;





cout %26lt;%26lt; "The square of " %26lt;%26lt; sqrt(num) %26lt;%26lt; " is " %26lt;%26lt; num;
Reply:Does not look easy, may be you can contact a C++ expert live at website like http://oktutorial.com/ .

hawthorn

No comments:

Post a Comment