Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the code to print an additional selection statement if the sum of the value is negative Support your experimentation with a screen capture of

Modify the code to print an additional selection statement if the sum of the value is negative Support your experimentation with a screen capture of executing the new code.

Prepare a new test table with at least 3 distinct test cases listing input and expected output for the selection statement you created in the previous exercise.

image text in transcribed

// C code // This program will calculate the sum of 5 integers. Developer: Faculty CMIS102 // Date: Jan 31, XXXX #include int main () /*variable definition: */ int valuel,value2, value3, value4,value5, sum; Initialize sum * /* sum 0; printf("Enter an Integer for valuel "); scanf("%d", &value 1); printf("Enter an Integer for value2 "); scanf("%d", &value2); printf("Enter an Integer for value3 "); scanf("%d", &value3); printf("Enter an Integer for value4 "); scanf("%d", &value4); printf("Enter an Integer for value5 "); scanf("%d", &value 5); sum = value1 + value2 + value3 + value 4 + value5; print f("Sum is %d " , sum ); if (sum >100) printf("Sum is over 100 "); return 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions

Question

Who is the target audience (or audiences)?

Answered: 1 week ago