Thứ Hai, 9 tháng 5, 2022

KYTHIQG C++

#include <bits/stdc++.h>
using namespace std;
float a,b,c,d,e,f,g,diem;

void nhap()
{
    cin>>a>>b>>c>>d>>e>>f>>g;
}
void giai()
{
    diem=(((a+b+c+d+e)/4+g)/2)+f;
       if(diem>=5&&a>1&&b>1&&c>1&&d>1)
        cout<<1;
    else cout<<0;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    freopen("kythiqg.inp","r",stdin);
    freopen("kythiqg.out","w",stdout);
    nhap();
    giai();
}

Không có nhận xét nào:

Đăng nhận xét

Lưu ý: Chỉ thành viên của blog này mới được đăng nhận xét.