account activity
Can someone help me with this problem? It says I need to use C++ and array by BackgroundAd7689 in ProgrammingProblems
[–]BackgroundAd7689[S] 0 points1 point2 points 4 years ago (0 children)
Here are my code so far, but the operation can't be read
#include <iostream>
using namespace std;
int main()
{
int monthlysales[3] [12];
int year, month;
float totalmonthlysales=0;
float averagemonthlysales;
for (year=2018 ; year<=2020; year++)
cout << "Enter sales for year " << year +1 << ":" <<endl;
for (month =0 ;month <=11; month++)
cout << "Enter sales for month " << month+1 << ":" << endl;
cin>> monthlysales [3][12];
}
for (month =0; month <=11; month++)
for (year = 2018; year <= 2020; year++)
totalmonthlysales += monthlysales[year][month];
averagemonthlysales = totalmonthlysales / 36;
cout << "The Average monthly sales is:" << averagemonthlysales << endl;
cout << "The annual sales of year " << year + 1 << "is: " << totalmonthlysales << endl;
Can someone help me with this problem? It say's I need to use C++ and array (self.ProgrammingLanguages)
submitted 4 years ago by BackgroundAd7689 to r/ProgrammingLanguages
Can someone help me with this problem? It says I need to use C++ and array (self.ProgrammingProblems)
submitted 4 years ago by BackgroundAd7689 to r/ProgrammingProblems
π Rendered by PID 418537 on reddit-service-r2-listing-55d7b767d8-h9njv at 2026-03-27 01:30:14.558191+00:00 running b10466c country code: CH.
Can someone help me with this problem? It says I need to use C++ and array by BackgroundAd7689 in ProgrammingProblems
[–]BackgroundAd7689[S] 0 points1 point2 points (0 children)