Który waszym zdaniem kod jest bardzie optymalny? i dlaczego tak uważacie?
KOD1:
#include<cstdio>
int main()
{
double a, b, c;
while(scanf("%le%le%le", &a, &b, &c)){
if(a+b>c && a+c>b && c+b>a) printf("%hd\n", 1);
else printf("%hd\n", 0);
}
return 0;
}
KOD2:
#include<iostream>
using namespace std;
int main()
{
double a, b, c;
while(cin>>a>>b>>c){
if(a+b>c && a+c>b && c+b>a) cout<<1<<endl;
else cout<<0<<endl;
}
return 0;
}