How to resolve the algorithm A+B step by step in the Oberon-2 programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm A+B step by step in the Oberon-2 programming language
Table of Contents
Problem Statement
A+B ─── a classic problem in programming contests, it's given so contestants can gain familiarity with the online judging system being used.
Given two integers, A and B. Their sum needs to be calculated.
Two integers are written in the input stream, separated by space(s):
The required output is one integer: the sum of A and B.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm A+B step by step in the Oberon-2 programming language
Source code in the oberon-2 programming language
MODULE ab;
IMPORT In, Out;
VAR A, B : INTEGER;
BEGIN
In.Int (A);
In.Int (B);
Out.Int (A + B, 8);
Out.Ln
END ab.
You may also check:How to resolve the algorithm Null object step by step in the Lua programming language
You may also check:How to resolve the algorithm Dutch national flag problem step by step in the Ring programming language
You may also check:How to resolve the algorithm Tree datastructures step by step in the zkl programming language
You may also check:How to resolve the algorithm K-d tree step by step in the Phix programming language
You may also check:How to resolve the algorithm Function composition step by step in the Fantom programming language