Answer to Question #270998 in C++ for nisa

Question #270998

write a program to calculate average accelaration


1
Expert's answer
2021-11-24T14:09:43-0500


#include <iostream>


using namespace std;


int main()
{
    int accelaration[8]={1,2,3,4,5,6,8};
    int sum=0;
    for(int i=0;i<8;i++){
        sum+=accelaration[i];
    }
    
    cout<<"Average accelaration = "<<(sum/8.0);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS