How to resolve the algorithm Detect division by zero step by step in the ERRE programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Detect division by zero step by step in the ERRE programming language

Table of Contents

Problem Statement

Write a function to detect a   divide by zero error   without checking if the denominator is zero.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Detect division by zero step by step in the ERRE programming language

Source code in the erre programming language

PROGRAM DIV_BY_ZERO

EXCEPTION
   IF ERR=11 THEN PRINT("Division by Zero") END IF
END EXCEPTION

BEGIN
  PRINT(0/3)
  PRINT(3/0)
END PROGRAM

  

You may also check:How to resolve the algorithm Sort an outline at every level step by step in the Wren programming language
You may also check:How to resolve the algorithm Anonymous recursion step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Atomic updates step by step in the C++ programming language
You may also check:How to resolve the algorithm Arithmetic/Complex step by step in the Arturo programming language
You may also check:How to resolve the algorithm Ultra useful primes step by step in the Nim programming language