/*Before seeing the code solution make sure that you have tried enough. Don’t copy- paste the whole code. Find out the logic. If you face any trouble, just inform me in comment.*/
#include<stdio.h>
main()
{
int m,n;
while(1)
{
scanf("%d%d",&m,&n);
if(m==0||n==0)
break;
else if(m>0&&n>0)
{
printf("primeiro\n");
}
else if(m>0&&n<0)
{
printf("quarto\n");
}
else if(m<0&&n>0)
{
printf("segundo\n");
}
else if(m<0&&n<0)
{
printf("terceiro\n");
}
}
return 0;
}
//Happy_Coding
#include<stdio.h>
main()
{
int m,n;
while(1)
{
scanf("%d%d",&m,&n);
if(m==0||n==0)
break;
else if(m>0&&n>0)
{
printf("primeiro\n");
}
else if(m>0&&n<0)
{
printf("quarto\n");
}
else if(m<0&&n>0)
{
printf("segundo\n");
}
else if(m<0&&n<0)
{
printf("terceiro\n");
}
}
return 0;
}
//Happy_Coding
No comments:
Post a Comment