头像

٩๑ㅂ۶




离线:5小时前


最近来访(3)
用户头像
iChenwei
用户头像
土狗
用户头像
图达

活动打卡代码 AcWing 662. 点的坐标

٩๑ㅂ۶
5小时前

include[HTML_REMOVED]

int main()
{

double a,b;
scanf("%lf %lf",&a,&b);
if(a==0&&b==0) printf("Origem");
else if(a==0)  printf("Eixo Y");
else if(b==0)  printf("Eixo X");
else if(a>0&&b>0) printf("Q1");
else if(a<0&&b>0) printf("Q2");
else if(a<0&&b<0) printf("Q3");
else if(a>0&&b<0) printf("Q4");
 return 0;

}



活动打卡代码 AcWing 660. 零食

٩๑ㅂ۶
5小时前

include[HTML_REMOVED]

int main()
{
int x,y;

double sum;
double p[6]={0,4.00,4.50,5.00,2.00,1.50};
scanf("%d %d",&x,&y);

printf("Total: R$ %.2lf\n", p[x] * y);

return 0;

}



活动打卡代码 AcWing 657. 选择练习1

٩๑ㅂ۶
5小时前

include[HTML_REMOVED]

int main()
{
int a,b,c,d;
scanf(“%d%d%d%d”,&a,&b,&c,&d);
if(b>c&&d>a&&c+d>a+b&&c>0&&d>0&&a%2==0)
{
printf(“Valores aceitos”);
}
else
{
printf(“Valores nao aceitos”);
}
return 0;
}



活动打卡代码 AcWing 655. 天数转换

٩๑ㅂ۶
5小时前

include[HTML_REMOVED]

int main()
{
int n;
int a,b,c;
scanf(“%d”,&n);
a=n/365;
printf(“%d ano(s)\n”,a);
b=n%365/30;
printf(“%d mes(es)\n”,b);
c=n%365%30;
printf(“%d dia(s)”,c);
return 0;
}



活动打卡代码 AcWing 654. 时间转换

٩๑ㅂ۶
5小时前

include[HTML_REMOVED]

int main()
{
int t;
int hour,min,s;

scanf("%d",&t);

hour = t / 3600;
min = t % 3600 / 60;
s = t % 3600 % 60;

printf("%d:%d:%d",hour,min,s);

return 0;

}



活动打卡代码 AcWing 653. 钞票

٩๑ㅂ۶
6小时前

include[HTML_REMOVED]

int main()

{
int n;
scanf(“%d”,&n);
printf(“%d\n”,n);
printf(“%d nota(s) de R$ 100,00\n”,n/100);
n%=100;
printf(“%d nota(s) de R$ 50,00\n”,n/50);
n%=50;
printf(“%d nota(s) de R$ 20,00\n”,n/20);
n%=20;
printf(“%d nota(s) de R$ 10,00\n”,n/10);
n%=10;
printf(“%d nota(s) de R$ 5,00\n”,n/5);
n%=5;
printf(“%d nota(s) de R$ 2,00\n”,n/2);
n%=2;
printf(“%d nota(s) de R$ 1,00\n”,n/1);
return 0;
}



活动打卡代码 AcWing 659. 区间

٩๑ㅂ۶
6小时前

include[HTML_REMOVED]

int main()

{
double a;
scanf(“%lf”,&a);
if (a>=0&&a<=25)
printf(“Intervalo [%d,%d]”,0,25);
else if (a>25&&a<=50)
printf(“Intervalo (%d,%d]”,25,50);
else if (a>50&&a<=75)
printf(“Intervalo (%d,%d]”,50,75);
else if (a>75&&a<=100)
printf(“Intervalo (%d,%d]”,75,100);
else
printf(“Fora de intervalo”);
return 0;
}




٩๑ㅂ۶
6小时前

include[HTML_REMOVED]

int main()

{
double a;
scanf(“%lf”,&a);
if (a>=0&&a<=25)
printf(“Intervalo [%d,%d]”,0,25);
else if (a>25&&a<=50)
printf(“Intervalo (%d,%d]”,25,50);
else if (a>50&&a<=75)
printf(“Intervalo (%d,%d]”,50,75);
else if (a>75&&a<=100)
printf(“Intervalo (%d,%d]”,75,100);
else
printf(“Fora de intervalo”);
return 0;
}



活动打卡代码 AcWing 661. 平均数3

٩๑ㅂ۶
6小时前

include[HTML_REMOVED]

int main()
{
double n1,n2,n3,n4;
double x,y;

scanf("%lf%lf%lf%lf",&n1,&n2,&n3,&n4);

x=(n1*2+n2*3+n3*4+n4*1)/10;
printf("Media: %.1lf\n",x);

if(x>=7) printf("Aluno aprovado.\n");
else if(x<5) printf("Aluno reprovado.\n");
else if(x>=5&&x<7) 
{
    printf("Aluno em exame.\n");
    scanf("%lf",&y);
    printf("Nota do exame: %.1lf\n",y);

    double z;
    z=(x+y)/2;

    if(z>=5) printf("Aluno aprovado.\n");
    else printf("Aluno reprovado.\n");

    printf("Media final: %.1lf\n",z);
}
return 0;

}



活动打卡代码 AcWing 667. 游戏时间

٩๑ㅂ۶
6小时前

include[HTML_REMOVED]

int main(){
int a,b,sum;
scanf(“%d %d”,&a,&b);
if (a>b)
{
sum = 24-a+b;
}

else if(a==b)

{
sum=24;
}

else

{
sum=b-a;    
}

printf("O JOGO DUROU %d HORA(S)",sum);
return 0;

}