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

(Answered):Evaluating Bias In Research . . . .(Answered):Evaluating Bias In Research . . . .

<h3>Question Description</h3> <p>Read article http://www.washingtonpost.com/business/economy/as-drug-industrys-influence-over-research-grows-so-does-the-potential-for-bias/2012/11/24/bb64d596-1264-11e2-be82-c3411b7680a9_story.html <br/></p><p/><ol><li>Identify the major assumptions and bias of the drug industry that underlie drug research.</li><li>Identify the personal bias that you, as a consumer, have on the drug industry’s

(Solved) : Lanuary 1 2018 Geen 2312 Executing Update Component Loop Statement Control Transfers Test Q26159904 . . . .(Solved) : Lanuary 1 2018 Geen 2312 Executing Update Component Loop Statement Control Transfers Test Q26159904 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F742%2F742e0dc0-cc11-40b9-bfab-ef195e244738%2Fimage" alt="lanuary 1, 2018 GEEN 2312 After executing the update component in a for loop statement, control transfers to test component initialization component body of the loop none of