|
|
вернуться в форумwhy does not work?!!! Послано sonic 31 авг 2005 08:36 #include <iostream.h> #include <math.h> void main() { short length; int input; char i; cin >> length; for ( i = 0; i < length; i++ ) { cin >> input; if ( (int)(sqrt((double)(8*input - 7))) == sqrt((double)(8*input - 7)) ) cout << '1'; else cout << '0'; } } Re: why does not work?!!! Послано swgr 3 фев 2006 13:17 the problem is: sqrt((double)(8*input - 7)) it should be: sqrt((double)(8*(double)(input)-7)) |
|
|