F&A Diskussionen
[CHALLENGE] avg (average) function
15 Stimmen
13 AntwortenWhat is the AVG main concept?
1 Stimme
8 AntwortenWhy Avg output is float?
1 Stimme
2 AntwortenSql
0 Stimmen
4 AntwortenSQL
0 Stimmen
5 Antwortendouble 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 Stimmen
3 AntwortenHeute heiß
Someone can help me
2 Votes
What's wrong with this?
2 Votes
X velocity
0 Votes
HTML community, HELP!!
2 Votes
Files not linking in C++
0 Votes
I am a super beginner
0 Votes
Web Dev
0 Votes
Pls give me an idea
1 Votes