write a program to calculate average accelaration
#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;
}
Comments
Leave a comment