#include <stdio.h>
double main()
{
double x;
printf("Aの金額を入力してください");
scanf("%lf", &x);
if (0 <= x < 3000)
{
printf("Aの値段は%d円です.\n", x);
}
else if (3000 <= x < 5000)
{
printf("Aの値段は%d円です.\n", 0.8 * x);
}
else if (x >= 5000)
{
printf("Aの値段は%d円です.\n", 0.7 * x);
}
else
{
printf("invalid price.\n");
}
}