#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 .

  • It is not difficult to translate, but why don't you do such a simple task yourself? cin >> - see scanf , cout << (not count !!!) - see printf ... 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 outputting x , its value is calculated - when you know what you can calculate ... - Harry
  • The check on a == 0 is done already after the division is made on a ... - AnT
  • Explain why you so diligently spoil the formatting? - Harry
  • 3
    This question should be closed, because the translation bureau is in another place ... - Harry
  • @Harry, from C ++ to C, is something new. I almost got it! - Qwertiy

1 answer 1

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; } 
  • one
    Gorgeous :) (10 characters) - int3
  • @ int3, how can I save quotes? - Qwertiy
  • one
    Pervert. (4 characters needed) - maestro