#include
#include
#include
using namespace std;
void Nuskaito (int A[],int &n) {
ifstream fd("muge.txt");
fd>>n;
for (int i=0; i>A[i];
fd.close;
}
int Suma(int A[],int n){
int s=0;
for (int i=0; i50)K++;
return K;
}
int main(){
int n;
int A[50];
Nuskaito(A,n);
for (int i=0;i<n;i++)
cout="" <<a[i]<<endl;
="" <<fixed<<setprecision(1)<<(double)suma(a,n)="" n<<endl;
="" return="" 0;
}
exercise:
number="" of="" farmers="" participating="" in="" the="" autumn="" fair="" recorded="" first="" line="" initial="" data="" file="" "muge.txt"="" n="" (n="" <50).="" following="" lines="" contain="" one="" integer="" -="" how="" many="" kilograms="" potatoes="" are="" used="" by="" farmer.prepare="" a="" program="" that="" calculates:="" a.="" were="" sold="" total;="" b.="" several="" more="" than="" 50="" kg="" potatoes;="" c.="" average="" single="" farmer="" to="" decimal="" place.
<b="">What I have tried:
Error:
line 12: statement cannot resolve adress of overloaded function
Warning:
line 31: this 'for' clause does not guard ...{-Wmisleading-indentation}
Note:
line 33 this statement,but the latter is misleadingly indented as if it is guarded