목록Career&Study/Coding Practice (15)
taeyounkim LOG
Code that prints a one-month calendar
#include int main() { int n,d,i,a; printf("Enter number of days in a month: "); scanf("%d", &n); printf("Enter starting day of the week (1=Sun 7=Sat) : "); scanf("%d", &d); for(a=1; a
Career&Study/Coding Practice
2021. 6. 12. 15:54
Checkbook Balance Program
#include int main() { int cmd; float balance = 0.0f, credit, debit; printf("Checkbook Balancing Program\n"); printf("Commands: 0=clear, 1=credit, 2=debit, 3=balance, 4=exit\n"); for(; ;){ printf("Enter command: "); scanf("%d", &cmd); switch(cmd){ case 0: balance=0.0f; break; case 1: printf("Enter amount of credit: "); scanf("%f", &credit); balance += credit; break; case 2: printf("Enter amount o..
Career&Study/Coding Practice
2021. 6. 12. 13:57