TOPIC
Erro 10% C++
CamilaBiancaSilvaCaldas asked 4 years ago
include
int main() { int t1,t2,t3;
scanf("%d %d %d",&t1,&t2,&t3);
if ((t1>t2)&&(t2==t3||t2<t3))
{
printf(":)\n");
}
else if ((t1>t2)&&(t2<t3||t2==t3))
{
printf(":(\n");
}
else if (t1<t2&&t2<t3)
{
if (t2-t1>t3-t2)
printf(":(\n");
else if(t2-t1<=t3-t2)
printf(":)\n");
}
else if (t1>t2&&t2>t3)
{
if (t2-t1<t3-t2)
{
printf(":)\n");
}
else
printf(":(\n");
}
else if (t1=t2&&t2<t3)
{
printf(":)\n");
}
else if (t1=t2&&t2>t3)
{
printf(":(\n");
}
return 0;
}
This topic has not been answered yet. Be the first!