Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // 4.cpp
- // 12
- //
- // Created by Алексей on 13/05/2019.
- // Copyright © 2019 Алексей. All rights reserved.
- //
- #include <iostream>
- #include <math.h>
- #include <cmath>
- #include <stdio.h>
- using namespace std;
- int main(){
- int n;
- cin>>n;
- int b[n],counter=0, summ=0;
- float midi;
- for(int i=0; i<n; ++i){
- cin>>b[i];
- }
- for(int i=0; i<n; ++i){
- summ+=b[i];
- }
- for(int i=0; i<n; ++i){
- if(b[i]<=40){
- counter++;
- }
- }
- if(counter>1){
- cout<<"YES";
- }else{
- cout<<"NO";
- }
- midi=summ/n;
- cout<<midi;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement