Course Solutions Uncategorized (Solved) : C Code Program Calculate Sum 10 Positive Integers Include Int Main Variable Definition Int Q33026312 . . . .

(Solved) : C Code Program Calculate Sum 10 Positive Integers Include Int Main Variable Definition Int Q33026312 . . . .

 

// C code// This program will calculate the sum of 10 positiveintegers.
#include <stdio.h>Int main (){/* variable definition : */int count, value, sum;Double avg;/* initialize*/Count = 0;Sum = 0;Avg = 0.0;//Loop through to input valuesWhile (count < 10){Printf(“Enter a positive integern”);Scanf (“%d”, &value);If (value >= 0) {Sum = sum + value;Count = count + 1;}Else {Printf (“value must be positive n”);}
}// calculate avg. need to type cast since two integers willyield an integerAvg = (double) sum/count;Printf(“average is %1fn “ , avg);Return 0;{

2. Change the c code to average 20 intergers.
3.Prepare a new test table with at least 3 distinct test caseslisting

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Question 2 25 Marks Outline Ten 10 Considerations Developing Continuity Plans 10 Marks Tec Q34199212Question 2 25 Marks Outline Ten 10 Considerations Developing Continuity Plans 10 Marks Tec Q34199212

<p dir="ltr"><img src="https://media.cheggcdn.com/media%2Ffb8%2Ffb863954-8259-4881-b80b-40b02dede3f9%2Fimage.png" alt="QUESTION 2 (25 Marks) a) Outline TEN (10) considerations in developing continuity plans. (10 Marks) Technical recovery plans are the heart of the recovery effort. They provide

(Answered) : Question 5 Yet Answered Marked Loo Dulac Box Plant Produces Wooden Packing Boxes Used Loca Q32708178(Answered) : Question 5 Yet Answered Marked Loo Dulac Box Plant Produces Wooden Packing Boxes Used Loca Q32708178

<br/><img src="https://media.cheggcdn.com/media%2Fa36%2Fa36c9eec-9627-41de-ab3a-2bc1daf5ecac%2Fimage.png" alt="Question 5 Not yet answered Marked out of LOO The Dulac Box plant produces wooden packing boxes to be used in the local seafood industry. Current operations allow