0% found this document useful (0 votes)
32 views1 page

Arithmetic Flowchart

The document outlines a flowchart for an arithmetic algorithm that takes two numbers as input and allows the user to choose an operation: addition, subtraction, multiplication, or division. It includes error handling for division by zero and displays the result of the chosen operation. The flowchart represents the sequence of steps from input to output in a structured format.

Uploaded by

cessprriinn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Arithmetic Flowchart

The document outlines a flowchart for an arithmetic algorithm that takes two numbers as input and allows the user to choose an operation: addition, subtraction, multiplication, or division. It includes error handling for division by zero and displays the result of the chosen operation. The flowchart represents the sequence of steps from input to output in a structured format.

Uploaded by

cessprriinn
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

digraph ArithmeticAlgorithm {

rankdir=TB size=8
node [shape=oval]
A [label=Start]
P [label=End]
node [shape=parallelogram]
B [label="Input First Number (num1)"]
C [label="Input Second Number (num2)"]
D [label="Display Options:
Add, Subtract, Multiply, Divide"]
E [label="Input Choice (operator)"]
L [label="Display Sum"]
M [label="Display Difference"]
N [label="Display Product"]
O [label="Display Quotient"]
J [label="Display 'Error: Division by zero'"]
node [shape=rectangle]
F [label="Calculate Sum = num1 + num2"]
G [label="Calculate Difference = num1 - num2"]
H [label="Calculate Product = num1 * num2"]
K [label="Calculate Quotient = num1 / num2"]
node [shape=diamond]
I [label="Is num2 == 0?"]
A -> B
B -> C
C -> D
D -> E
E -> F [label="Choice = 'Add'"]
E -> G [label="Choice = 'Subtract'"]
E -> H [label="Choice = 'Multiply'"]
E -> I [label="Choice = 'Divide'"]
I -> J [label=Yes]
I -> K [label=No]
F -> L
G -> M
H -> N
K -> O
J -> P
L -> P
M -> P
N -> P
O -> P
}

You might also like