Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int num, number;
- cin >> num;
- int sum = 0;
- for (int i = 0; i < num; i++) {
- cin >> number;
- sum += number;
- }
- double average = 1.0 * sum / num;
- printf("%.2f\n", average);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement