#include <cs50.h>
#include<math.h>
int main(void)
{
int n = 0;
do
{
n = (get_float("Change owed: ") * 100);
}
while (n < 0);
int q = ((n / 25) %)
int d = ((q / 10) %)
int r = ((d / 5) %)
int c = (n %)
int i = q + d + n + c
printf("%i");
}
In the slides, I leaned "%" meant remainder in C math. Unfortunately, it seems like I may have used % incorrectly or something else is wrong. Please help!
I have some screenshots regarding this, a la below.
Could anyone tell me how to fix this? I KNOW the forum idol Cliff B would be (a bit) unhappy with this, but I am utterly lost. Please help me! I have (re)watched the lectures and reviewed the slides. I would appreciate your help! It would be appreciated!
int n;
should do the same thing.