RE: [Dev-C++] Whole numbers and perfect square
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Eric R. <e.r...@pa...> - 2002-11-03 21:04:19
|
"Sorry Brain. You failed in the interview."
I not sure what above line means, the code below works OK, I think maybe
Brain passed.
#include <iostream.h>
#include <math.h>
int main()
{
double Number;
double Result;
cout << "Enter a number ";
cin >> Number;
Result = sqrt(Number);
if (Result == floor(Result))
{
cout << Number << " is a perfect square!" << endl;
}
if (Result != floor(Result))
{
cout << Number << " is not a perfect square!" << endl;
}
cin >> Number ;
return 1;
}
From Eric
NO ATTACHMENT WAS SENT WITH THIS EMAIL,
IF THERE IS ONE, IT IS A UNDETECTED VIRUS, PLEASE LET ME KNOW..
Black text on white background HTML Emails and replied with white text on
white.
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Ihsan Ali
Al Darhi
Sent: 26 October 2002 16:30
To: Brian C. Becker; dev...@li...
Subject: Re: [Dev-C++] Whole numbers and perfect square
> double Number;
> double Result;
> Result = sqrt(Number);
> if (Result == floor(Result)){
Sorry Brain. You failed in the interview.
Mohammed
-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.410 / Virus Database: 231 - Release Date: 31/10/02
|