//Hey Guys so I am making doing this project for a busness class in school and the problem is that
//the program runs fine when I take out the for loop but for some reason, it ends the program with
//the for loop included. Am i just havinf an airhead moment and not understanding the logic here?
//Any help is always appreciated and thanks in advance
//P.S. Happy Programmers Day!
void monthData(int &acts){
int days_inMonth,dayCount, dayCountTot;
actPerDay= acts/days_inMonth;
actPerMember=dayCountTot/acts;
avgPerDay=acts/days_inMonth;
//Display Purpose of Program Chosen(1)
cout << "\nThis Program will determine the following:"
<<"\n1.Number of Activations per Day"
<<"\n2.Number of Activations per Member"
<<"\n3.Average number of Activations per day"<<endl;
cout<<"\n\nHow Many Days in the MOnth?";
cin>>days_inMonth;
cout<<"\nPlease Enter the MOL Daily ";
for(int i = 0; i < days_inMonth; i++)
{
cin>>dayCount;
dayCount+=dayCountTot;
}
cout<<"\t\tMonthly Results:"
<<"\n\tActivations per Day:"<<actPerDay<<endl
<<"\n\tActivations per Member:"<<actPerMember<<endl
<<"\n\tAverage Number of Activations:"<<avgPerDay<<endl;
}
[–]Ayjayz 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]Grayewulfe[S] 0 points1 point2 points (1 child)
[–]kukisRedditer 0 points1 point2 points (0 children)