C语言入门级别的代码,求带

img

#include <iostream>
using namespace std;
int main()
{
    int a,b,c;
    char ch;
    cin >> a >> ch >> b >> ch >> c;
    if(a <= 0 || b <= 0 || c <= 0)
        cout << "error" << endl;
    else
    {
        if(a+b>c && a+c >b && b+c > a)
            cout << "yes"<<endl;
        else
            cout << "no" << endl;
    }
    return 0;
}

#include <stdio.h>
#include <algorithm.h>
int main()
{
    int a[3];
    char ch;
    scanf("%d%c%d%c%d", &a[0], &ch, &a[1], &ch, &a[2]);
    sort(a, a + 3);
    if (a[0] < 0)
    {
        printf("error");
    }
    else if (a[0] + a[1] > a[2])
    {
        printf("yes");
    }
    else
    {
        printf("no");
    }
    return 0;
}

感谢点赞 如果有需要可以关注一波