Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

why does the computer cannot read divided by 0

+2 votes
asked Oct 7, 2025 by Althea E. Mindaros (140 points)

1 Answer

0 votes
answered Oct 8, 2025 by Peter Minarik (101,420 points)

Because in integral arithmetics, division by zero makes no sense. How do you split 5 into 0 whole parts?

In floating-point arithmetics, division by zero makes sense. It's the scientific way, saying something divided by zero tends to be infinite.

lim x -> 0 (N / x) = ∞,

i.e., if N is divided by smaller and smaller numbers (x), then the result is getting bigger and bigger. It tends toward infinity.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...