so heres my code:
#include
using namespace std;
int main()
{
int t;
double m, n;
cin >> t;
int i = 1;
while(i<=t)
{
cin >> m >> n;
cout << m / n << endl;
i++;
}
return 0;
}
and when we compile and write t=7 and then m=50 n=0 we got answer “inf” what i did wrong

  • created

    Apr '21
  • last reply

    Apr '21
  • 1

    reply

  • 463

    views

  • 2

    users

What answer do you expect when dividing 50 by 0?