You're welcome. As a courtesy, I rewrote your program exactly as you had it (filling in the missing code) and compiled it. This is the code I compiled, and the compiler warnings I got:
Code:
#include <stdio.h>
int main(void)
{
int pen, nick, dim, quart, total;
printf("Hawk jents by Me\n");
printf("\nEnter number of Pennies (0-100): ");
scanf("%d%",&pen);
printf("\nEnter number of Nickels (0-20): ");
scanf("%d%",&nick);
printf("\nEnter number of Dimes (0-10): ");
scanf("%d%",&dim);
printf("\nEnter number of Quarters (0-4): ");
scanf("%d%",&quart);
total = ((pen * 1) + (nick * 5) + (dim * 10) + (quart * 25) ) * 2;
printf("\n\nTotal Hawk Jents = %d",total);
printf("\n\nThanks for using Hawk Jents Calculator!");
return 0;
}
/*
main.c||In function 'main':|
main.c|9|warning: spurious trailing '%' in format|
main.c|11|warning: spurious trailing '%' in format|
main.c|13|warning: spurious trailing '%' in format|
main.c|15|warning: spurious trailing '%' in format|
||=== Build finished: 0 errors, 4 warnings ===|
*/
These warnings should have been a clue for you to locate where the problem might have been. If your compiler didn't mention any warnings, then you need to increase your compiler warnings.
Also, just a minor comment: Variable names should clearly state their purpose. You came close, but I would recommend not truncating words that are already short (e.g. "penny", "nickel", "dime", "quarter").
Otherwise, good work!