we are assigned to develop a c++ program that accepts a list of a maximum of 100 voltages as input, determine both the average and standard deviation of the input voltages, and then displays the results. There are still errors and it says it requires array or pointer type. Can someone help me with this? :(((((
#
// project
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main ()
{
double average, deviation, squareddev, standarddev, dev;
int num, volt, val, sum=0;
int i, j, k;
{
cout<<"Enter the number of voltages to be analyzed:";
cin>>num;
for(i=0; i=num; i++)
{
cout<<endl;
for(j=0; j<num; j++)
{
cout<<"Enter voltage"<<val[j]<< ":" ;
cin>>volt;
if(volt>100)
volt=num[i];
{
cout<<endl;
cout<<"Sorry; The volt you entered to be added should be at 100 only...";
return 0;
}
sum=sum+volt;
}
}
average=sum/num;
for(k=0; k=num; k++)
{
dev=volt [i]-average;
deviation=deviation+dev;
cout<<"The average of the voltage is:"<< average<<endl;
cout<<"The standard deviation of the voltage is:"<<standarddev<<endl;
return 0;
}