Dyskusje Q&A
double arr[]={5,2,7,8,11,9};
int n = sizeof(arr) / sizeof(arr[0]);
double sum = 0;
for(int i=0;i<n;i++)
{
sum+= arr[i];
}
double avg = sum / n;
cout<< "avarage ="<< avg<< endl;
return 0;
)
/*what does int n= sizeof(arr[]) /sizeof(arr[0]);
do, can someone explain that line for me*/
0 głosów
3 odpowiedziPopularne dzisiaj
Quiz
0 Votes
Sockets, etc
0 Votes
Necesitó ayuda
1 Votes
C++ Vectors
0 Votes
A Little Question Here!
1 Votes
can't understand an error
0 Votes
Loop
0 Votes