Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Running Head: PROGRAMMING 1

The Sum and Difference Program

CIS207

<name>

Stratford University, Falls Church, Virginia

<date>
2

IIPO

Initialization: (define variables, an initial starting value, objects, etc.)

firstInt = 0

secondInt =0

sum = 0

difference =0

Input: (Which variables are used to get user input)

“enter the first number” = firstInt

“enter the first number” = secondInt

Processing: (Equations, logic, pseudo code)

BEGIN

NUMBER firstInt, secondInt, sum, difference,

OUTPUT(" "Enter the First Number":")

INPUT firstInt

OUTPUT(" "Enter the Second Number":")

INPUT secondInt

Sum = firstInt + secondInt


3

Difference = firstInt - secondInt

OUTPUT sum

OUTPUT difference

END

Output: (What output is displayed? What test cases should be used to make sure the program

works correctly)

"Sum of two integers: %d%n", firstInt + secondInt

"Difference of two integers: %d%n", firstInt - secondInt

Implementing the problem

Here is the output of the program. I tested the application by running several.
4

You might also like