// 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
PayPal Gateway not configured
PayPal Gateway not configured