Using loops write a c++ program to calculate the average of even numbers among 10 different numbers.
#include <iostream>
using namespace std;
int main() {
int n, total = 0, count = 0;
cout << "Enter 10 numbers: ";
for (int i = 0; i < 10; ++i) {
cin >> n;
if (n % 2 == 0) {
total += n;
++count;
}
}
cout << "Average of all even numbers entered is: " << total/(double)count << endl;
return 0;
}
Using loops write a c++ program to calculate the average of even numbers among 10 different...