answersLogoWhite

0

/*mycfiles.wordpress.com

To Calculate Sum & Average of 4 no.*/

#include<stdio.h>

#include<conio.h>

void main()

{

float a,b,c,d,sum,avg;

clrscr();

printf("Enter the 4 nos.\n\n");

scanf("%f%f%f%f",&a,&b,&c,&d);

sum=a+b+c+d;

avg=(a+b+c+d)/4;

printf("\nSum is= %f\nAverage is= %f",sum,avg);

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

What is the algorithm and draw flow chart to find the sum and average of 3 numbers?

Algorithm to find the sum and average of 3 numbers: Start. Input three numbers (let's call them A, B, and C). Calculate the sum (Sum = A + B + C). Calculate the average (Average = Sum / 3). Output the sum and average. End. Flowchart: [Start] &amp;darr; [Input A, B, C] &amp;darr; [Sum = A + B + C] &amp;darr; [Average = Sum / 3] &amp;darr; [Output Sum, Average] &amp;darr; [End]


How do you write a pseudocode that accepts five numbers and displays the sum and average of the numbers?

To write pseudocode that accepts five numbers and displays their sum and average, you can follow these steps: Initialize a variable sum to 0. Loop five times to accept input for each number, adding each to sum. After the loop, calculate the average by dividing sum by 5. Display both the sum and the average. Here’s a simple representation: BEGIN sum = 0 FOR i FROM 1 TO 5 DO INPUT number sum = sum + number END FOR average = sum / 5 OUTPUT &quot;Sum: &quot;, sum OUTPUT &quot;Average: &quot;, average END


What is the average of 8 numbers if their sum is 2464?

The mean average of a set of numbers is the sum of the numbers divided by how many of them there are. If there are 8 numbers with a sum of 2464, their mean average is 2464 &divide; 8 = 308.


How to write an algorithm that accepts five numbers and displays the sum and average of the numbers?

1.Start Algorithm 2.Enter first number 3.Enter second number 4.Enter third number 5.Enter fourth number 6.Enter fifth number 7.Add five number 8.display five number / 2 9.Display result 10.End Algorithm


What is the average of 16 and 40?

The average of a series of numbers is their sum divided by however many numbers there are: in this case you would calculate: (16 + 40) / 2 =56 / 2 =28 Therefore the average of 16 and 40 is 28.

Related Questions

How do you write a pseudocode that accepts five numbers and displays the sum and average of the numbers?

To write pseudocode that accepts five numbers and displays their sum and average, you can follow these steps: Initialize a variable sum to 0. Loop five times to accept input for each number, adding each to sum. After the loop, calculate the average by dividing sum by 5. Display both the sum and the average. Here’s a simple representation: BEGIN sum = 0 FOR i FROM 1 TO 5 DO INPUT number sum = sum + number END FOR average = sum / 5 OUTPUT &quot;Sum: &quot;, sum OUTPUT &quot;Average: &quot;, average END


Write a program to calculate the sum of two numbers in unix?

$vi sum.sh echo "enter the 1st no." read num1 echo "enter the 2nd no." read num2 sum= 'expr $num1 + $num2' echo "sum of the numbers is $sum"


What is the average of 8 numbers if their sum is 2464?

The mean average of a set of numbers is the sum of the numbers divided by how many of them there are. If there are 8 numbers with a sum of 2464, their mean average is 2464 &divide; 8 = 308.


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


How to write an algorithm that accepts five numbers and displays the sum and average of the numbers?

1.Start Algorithm 2.Enter first number 3.Enter second number 4.Enter third number 5.Enter fourth number 6.Enter fifth number 7.Add five number 8.display five number / 2 9.Display result 10.End Algorithm


How do you calculate the average of 5 numbers?

1)start 2)input 5 numbers m,a,i,r,a 3)average=sum/5 4)printsum 5)stop


How do you find the sum of five numbers if the average of the five numbers is 790.6?

The average of a group of numbers is equal to the sum of the numbers divided by the number of numbers. If you want to find the sum of the five numbers, just multiply 790.6 by 5 to get the sum, which is 3953


How to calculate?

You can calculate the sum of numbers by adding numbers together. You can calculate the product of numbers by multiplying those numbers.


If the sum of four numbers is 14.8 what is the average of the four numbers?

The average, in this case, is the sum divided by 4 (since there are 4 numbers).


How do you find the median if theres two in the middle?

You calculate the normal average between the two central numbers.You calculate the normal average between the two central numbers.You calculate the normal average between the two central numbers.You calculate the normal average between the two central numbers.


What is the average of 16 and 40?

The average of a series of numbers is their sum divided by however many numbers there are: in this case you would calculate: (16 + 40) / 2 =56 / 2 =28 Therefore the average of 16 and 40 is 28.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers