Ok, here goes... How I would access certain elements in my array to perform calculations??? i.e the elements in my array pressure[0]to[7]
#include <iostream>
#include <string>
#include <fstream>
#include<iomanip>
using namespace std;
int date[30];
int size=30;
double pressure[30];
double highTemp[30];
double lowTemp[30];
int windSpeed[30];
int batteryPower[30];
string solarPanelOpen[30];
int k=0;
string month;
double totalHighTemp;
double totalLowTemp;
double totalSpeed;
double totalPressure;
double result1;
double wk1Pressure;
double wk1avg;
int size1=7;
int size3=2;
int sum;
int main()
{
ifstream inCuriosityRoverFile("CuriosityRover.txt", ios::in );
if(!inCuriosityRoverFile)
{cerr<< "File could not be opened"<<endl;
exit(1);}// exit if statement
cout<<"***************************************************************"<<endl;
cout<<"Curiosity Data Collected"<<endl;
while(getline(inCuriosityRoverFile.seekg(0), month, ','))
cout<<"Monthly average High Temperature: "<<avg1<<" Deg. Cel."<<endl;
cout<<"Monthly average Low Temperature: "<<avg2<<" Deg. Cel."<<endl;
cout<<"Monthly average Wind Speed: "<<avg3<<" Meters per second"<<endl;
cout<<setprecision(3)<<"Monthly average Pressure: "<<avg4<<" Kilo Pascal"<<endl;
cout<<"The highest battery power available: "<<highest<<"%"<<endl;
cout<<"The lowest battery power available: "<<lowest<<"%"<<endl;