10.19 2

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main(){
    int a,b,c,s;
    cout<<"enter three number"<<endl;
    cin>>a>>b>>c;
    if(a+b>c&&a+c>b&&b+c>a){
    s=(a+b+c)/2;
    cout<<s<<endl;
    }else{
        cout<<"it is not a trilateral!"<<endl;
        }
    return 0;
}

原文地址:https://www.cnblogs.com/sanyeai/p/7692513.html