このプログラムを実行したところ、エラー式の結果が未使用になりました。私は何か単純な間違いをしているかもしれませんが、それを理解しようとして一日を費やしましたが、役に立ちませんでした. あなたが提供できるどんな助けも大歓迎です。
#include <stdio.h>
#include <cs50.h>
int main()
{
int x, y = 0;
printf("Enter the amount of change ");
x = GetFloat() * 100;
while (x != 0)
{
if (x >= 25)
{
x - 25;
y = y + 1;
}
if (x >= 10 && x < 25)
{
x - 10;
} y = y + 1;
if (x >= 5 && x < 10)
{
x - 5;
} y = y + 1;
if (x >= 1 && x < 5)
{ x - 1;
y= y + 1;
}
}
printf("The number of coins neccessary is %d", y);
}