#include <iostream> using namespace std; int main () { float a, b, x; cin>>a>>b; x = (0 - b)/a; if (a == 0 && b == 0) count <<"Any"; else if (a == 0) count<<"No answer"; else count<<x; return 0; } Closed due to the fact that the question is too common for participants Vlad from Moscow , Igor , Harry , Qwertiy ♦ , D-side Jan 30 '17 at 17:33 .
Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .
|
1 answer
Well, almost got what I wanted: http://ideone.com/wH0b4V
typedef double using; #define namespace namespace, #include <stdio.h> #define cin double*p[]={&namespace 0};scanf("%lf %lf", &std, &namespace std) #define float int signed count; #define return return!printf("%f\0Any\0$$No answer"+3*(!std*(1+2*!!**p)),-**p/std), //\ #include <iostream> using namespace std; int main () { float a, b, x; cin>>a>>b; x = (0 - b)/a; if (a == 0 && b == 0) count <<'Any'; else if (a == 0) count<<'No answer'; else count<<x; return 0; } - oneGorgeous :) (10 characters) - int3
- @ int3, how can I save quotes? - Qwertiy ♦
- onePervert. (4 characters needed) - maestro
|
cin >>- seescanf,cout <<(notcount!!!) - seeprintf... Nonsense in a checks for equality to zero - how did you divide it into zero before? The test must be performed first, and only then, before outputtingx, its value is calculated - when you know what you can calculate ... - Harrya == 0is done already after the division is made ona... - AnT