Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Where do I place the integers in the code? I have the code but i don’t

Where do I place the integers in the code? I have the code but i don’t

understand where i place the code so it can run properly?

1CMIS 102 Hands-On LabWeek 5OverviewThis hands-on lab allows you to follow and experiment with the critical steps of developing a programincluding the program description, analysis, test plan, design (using pseudocode), and implementationwith C code.The example provided uses sequential, selection and repetition statements.Program DescriptionThis program will calculate the average of 10 positive integers. The program will ask the user to 10integers. If any of the values entered is negative, a message will be displayed asking the user to enter avalue greater than 0. The program will use a loop to input the data.AnalysisI will use sequential, selection and repetition programming statements.I will define two integer numbers: count, value and sum. count will store how many times values areentered. value will store the input. Sum will store the sum of all 10 integers.I will define one double number: avg. avg will store the average of the ten positive integers input.The sum will be calculated by this formula:sum = sum + valueFor example, if the first value entered was 4 and second was 10:sum = sum + value = 0 + 4sum = 4 + 10 = 14Values and sum can be input and calculated within a repetition loop:while count <10Input valuesum = sum + valueEnd whileAvg can be calculated by:avg = value/countA selection statement can be used inside the loop to make sure the input value is positive.If value >= 0 thencount = count + 1Elseinput valueEnd If
Background image of page 1
2Test PlanTo verify this program is working properly the input values could be used for testing:Test CaseInputExpected Output1value=1value=1value=1value=0value=1value=2value=0value=1value=3value=2Average = 1.22value=100value=100value=100value=100value=100value=200value=200value=200value=200value=200Average = 150.03value=100value=100value=100value=100value=-100value = 100value=200value=200value=200value=200Input a positive valueaverage is 140.0Pseudocode// This program will calculate the average of 10 positive integers.// Declare variablesDeclare count, value, sum as IntegerDeclare avg as double//Initialize valueSet count=0
Background image of page 2

Show 

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"