21天养成良好习惯-8
#include <stdio.h>
#include <stdlib.h>
int main()
{
float p,q;
printf(“Input payment p:”);
scanf("%f",&p);
q=p*0.92;
printf(“price = %.1f\n”,q);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a,b,c,d,x,y,z;
printf(“Input time one(hour, minute):”);
scanf("%d,%d",&a,&b);
printf(“Input time two(hour, minute):”);
scanf("%d,%d",&c,&d);
x=fabs(a60+b-c60-d);
y=x/60,z=x%60;
printf("%d hour %d minute\n",y,z);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,y;
scanf("%d",&x);
y=x/9*2;
printf("%d",y);
return 0;
}