Write a loop to total and average the contents of the array

Assignment Help C/C++ Programming
Reference no: EM13339447

Given the following code, write a loop to total and average the contents of the array:

#include <iostream>
using namespace std;

void main(void)
{
int grades[] = {100, 90, 88, 75, 99};
int total
int average

}

 

Reference no: EM13339447

Questions Cloud

Why is the density of states at the fermi energy : For electrons in a metal, why is the density of states at the Fermi energy approximately equal to the density of free electrons divided by the Fermi energy
How far should the objective lens be from the specimen : A microscope with an 6.5-mm-focal-length objective has a tube length of 14.0cm. how far should the objective lens be from the specimen
Write a class called fraction : Write a class called Fraction (this is not related to problem 2 from the text).
Determine the frequency of the beat organs produce : Two organ pipes, open at one end but closed at the other, are each 1.27m long. One is now lengthened by 2.00cm. Find the frequency of the beat they produce when playing together in their fundamental.
Write a loop to total and average the contents of the array : Given the following code, write a loop to total and average the contents of the array.
Distinction between adjusting and non-adjusting events : Explain the distinction between adjusting and non-adjusting events and discuss the requirements under the standard for the disclosure of events after the reporting period
What is the magnitude and direction of the magnetic field : An electric current I=5.0 amp flows down the y-axis and to the right on the x-axis. What is the magnitude and direction of the magnetic field at a point in the x-y plane with coordinates (a,a) where a=20 cm
How thick is the glass : A double-slit experiment is set up using a helium- neon laser (lamda=633nm). How thick is the glass
How large a vertical force must each person exert on beam : Two people, one at each end of a uniform beam that weighs 400N hold the beam at an angle of 25 degrees to the horizontal

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Structured programming using procedural languages

A a program that is called "Playing with Numbers or Letters".

  Use structures to create c program to compute student record

Explain the following and give their suitable syntax. A pointer. Use structures to create C program to compute and store student records of class.

  Create the roman.h and implement roman class in roman.cpp

Create the roman.h and implement the Roman class in roman.cpp. Make sure that you put in measures to prevent multiple inclusion of the header file. Test your implementation using task2a.cpp.

  Write a program in c of fibonacci series

Write a program in c of fibonaci series with and without using fibo func, both

  Perform operations on arrays

Perform operations on arrays execute tests and repetitions

  Write a program that find the average time spent programming

Write a program that finds the average time spent programming by a student each day over a 3 day period.

  Write an application that creates a quiz

Write an application that creates a quiz, which contains at least 5 questions about a hobby, popular music, astronomy, or any other personal interest. Each question can be multiple choice(a,b,c,d should be user accepted response), or true or false(t ..

  What is the output of this code fragment as it is written

In the code fragment below, the programmer has almost certainly made an error in the first line of the conditional statement.

  Write c program which has parent process and child process

Write a C program that has a parent process, a child process, and a grandchild process. The parent process should print its id and the square or 5.

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Braces for blocks of code

C-- should have braces for blocks of code, an if statement, while statement, and a double, int, and character. Each statement ends with a semi-colon and you must have a main routine

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd