Code Logo

Sum Three Numbers

Published at19 Apr 2026
Calculations & Math Easy 4 views
Like0

Adding things up is the bread and butter of any calculation system. In Sum Three Numbers, you are practice basic accumulation by taking three different values and combining them into a single total.

Think of it like adding items to a shopping cart or totaling up points in a three-round game. You just need to take each of the three inputs and add them together to get the final result.

If your inputs are 1, 2, and 3, you simply add them up to get 6. It''s a fundamental exercise in handling multiple inputs and producing a single, correct sum.

Learn about our pseudocode specification
Guide

Example Input & Output

Example 1
Input
a = 2, b = 3, c = 4
Output
9
Explanation

2 + 3 + 4 = 9.

Example 2
Input
a = -2, b = 7, c = 1
Output
6
Explanation

-2 + 7 + 1 = 6.

Example 3
Input
a = 10, b = 0, c = 5
Output
15
Explanation

10 + 0 + 5 = 15.

Algorithm Flow

Recommendation Algorithm Flow for Sum Three Numbers
Recommendation Algorithm Flow for Sum Three Numbers

Solution Approach

First, read the three integers.

Then add the first number, second number, and third number into one total.

Store that total in a variable if you want, or print it directly after the calculation.

At the end, output the sum.

Best Answers

Pseudocode - Approach 1
program sum_three_numbers
dictionary
   a, b, c, sum: integer
algorithm
   input(a, b, c)
   sum <- a + b + c
   output(sum)
endprogram