//Dev-C++ 5.11
#include
using namespace std;
int main(void)
{float a,b;
cin>>a>>b;
if(a==0 && b==0)
cout<<"No solve";<br> else
if (b==0)
cout<<"No solve";<br> else
if(a==0)
cout<<"(-infinity;+infinity)";<br> else
{if(b>0 && a>0) cout<<"(-infinity;"<<a/b<<")";<br> if(b<0 && a>0) cout<<"("<<a/b<<";+infinity)";<br> if(b>0 && a<0) cout<<"("<<a/b<<";+infinity)";<br> if(b<0 && a<0) cout<<"(-infinity;"<<a/b<<")";}<br> return 0;}
Пример ввода:
1
-7
Пример вывода:
(-0.142857;+infinity)