This hands-on lab allows you to follow and experiment with


Overview:

This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, Analysis, Design(program design, pseudocode), Test Plan, and implementation with C code. The example provided uses sequential, selection and repetition statements.

Program Description:

This program will calculate the sum of 3 integers. The program will ask the user to 3 integers. If the sum of the numbers is greater than 100, a message is printed stating the sum is over 100. The design step will include both pseudocode.

Analysis:

I will use sequential, and selection programming statements.

I will define four integer numbers: value1, value2, value3 and sum.

The value1, value2, value3 variables will store the integers input by the user. The sum will store the sum of the 3 values.

The sum will be calculated by this formula: sum = value1 + value2 + value3

For example, if the first values entered were 1,2, and 3 respectively: sum = 1 + 2 + 3 = 6

The additional selection statement will be of this form:

If sum > 100 then

print "Sum is over 100" End If

Program Design:

Main

// This program will calculate the sum of 3 integers.
// Declare variables
// Initialize variables

//Prompt user for a number1
//Get user response

//Prompt user for a number2
//Get user response

//Prompt user for a number3
//Get user response

//Calculate sum

// Print results - sum

//Print remark based on value of sum End //End of Main.

Attachment:- Lab.rar

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: This hands-on lab allows you to follow and experiment with
Reference No:- TGS01626615

Expected delivery within 24 Hours