answersLogoWhite

0


Best Answer

#include <iostream.h>

#include <conio.h>

void main()

{

float arr1[5], avg=0, sum=0;

cout<<"Enter 5 values for sum and average: "<<endl;

for(int i=0; i<5; i++)

{

cin>>arr1[i];

sum+=arr1[i];

}

avg=sum/5;

cout<<"Sum of 5 values is: "<<sum<<endl;

cout<<"Average of 5 values is: "<<avg;

getche();

}

User Avatar

Wiki User

โˆ™ 2012-05-25 21:56:41
This answer is:
User Avatar
Study guides

Data Science

โžก๏ธ
See all cards
4.29
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
7 Reviews

Add your answer:

Earn +20 pts
Q: How do write a program using one dimensional array that calculates the sum and average of the five input values from the keyboard and prints the calculated sum and average?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What does daverage do in Excel?

It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.It calculates an average from a database list in Excel, using specified criteria.


How is speed calculates?

Average speed is calculated by dividing the total distance covered divided by the time taken. Instantaneous speed is calculated as the derivative of displacement with respect to time.


Who calculates the consumer price index?

The United States Bureau of Labor Statistics calculates the consumer price index. The CPI is calculated monthly based on goods and services purchased by the average urban household.


In Excel what is the AVERAGE function?

Excel average function calculates the average for a set of values. Look in the related link for a tutorial


How average profit method calculates goodwill?

Goodwill = Average Profits X Number of years of Puchase


What is the average cost of a backlit keyboard?

The average cost of a backlit computer keyboard is around $40.


What is the average price for an electronic piano keyboard?

The average price for an electric piano keyboard is 93 dollars. This will depend on the quality of the keyboard and the location that you purchase it from!


What is the average price to purchase a PC keyboard?

Average PC keyboard prices can range anywhere from $15 to $80. Keyboard prices depend on the type of keyboard, the brand, durability, and many other factors.


What is the average price of a keyboard?

$15?


Average weight 48 years?

That all depends on height and build, below is a link that calculates it.


Is a keyboard a input or output device?

An average keyboard is an input device. You input information by typing.A keyboard is an input device


How many keys are altoghether in keyboard?

On average there are 108/109 keys on a computer keyboard.

People also asked