- 1
Can somebody help me write a c++ program that accepts 10 numbers in an array,and also finds the average of the ten numbers
Pls I need help
4 Respuestas
+ 8
Saleh we can only help you if you have started up something otherwise no.
Here on SL we don't do assignments or projects for users without them showing us a work done by them.
https://code.sololearn.com/WU0L031ezdyo/?ref=app
https://www.sololearn.com/discuss/1316935/?ref=app
+ 6
Inside the for loop, the second sum variable has been misspelled. Change it to sum from sim. Also, the keywords are case sensitive. Change For to for (lowercase f).
+ 4
// Fixed a couple typos...
#include <iostream>
using namespace std;
int main() {
double values [10] = {10,20,30,40,50,60,70,80,90,11};
double sum = 0;
for ( int i = 0; i < 10; i++ ) {
sum = sum + values [i];
}
cout << sum/10<<endl;
return 0;
}
+ 1
#include <iostream>
using namespace std;
int main() {
double values [10] = {10,20,30,40,50,60,70,80,90,11};
double sum = 0;
For ( int i = 0; i < 10; i++ ) {
sum = sim + values [i];
}
cout << sum/10<<endl;
return 0;
}
Hey is my code but its not working