#include<stdio.h>
#include<stdlib.h>
void main()
{
double count = 0;
int input = 0;
int sum = 0;
float average=0;
while ( count < 20)
{
printf("Please enter integer number : ");
scanf_s("%d" , &input);
sum = sum + input;
count = count++;
}
average = sum / count;
printf("The total sum is :%d\n" , sum);
printf("The average of values entered is :%g\n", average);
system("pause");
}
kmlila 0 Newbie Poster
frogboy77 73 Posting Pro in Training
kmlila 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
kmlila 0 Newbie Poster
zeroliken 79 Nearly a Posting Virtuoso
kmlila 0 Newbie Poster
zeroliken 79 Nearly a Posting Virtuoso
kmlila 0 Newbie Poster
zeroliken 79 Nearly a Posting Virtuoso
kmlila 0 Newbie Poster
kmlila 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.