
Read it right next to your computer.
Book version bitter C
#include <stdio.h>
#define TRI(A, H) ((A) * (H) / 2)
int main(void)
{
int side, high, square;
scanf("%d,%d", &side, &high);
printf("%d\n", TRI(side, high));
return 0;
}
#include <stdio.h>
int olympic(int year);
enum {
OLYMIPC_NON,
OLYMIPC_SUMMER,
OLYMIPC_WINTER,
};
int main(void)
{
int year, hold;
scanf("%d", &year);
hold = olympic(year);
switch (hold) {
case OLYMIPC_NON:
printf("開かれない\n");
break;
case OLYMIPC_SUMMER:
printf("夏季五輪\n");
break;
case OLYMIPC_WINTER:
printf("冬季五輪\n");
break;
};
return 0;
}
int olympic(int year)
{
if (year % 2 == 0) {
if (year % 4 == 0) {
return OLYMIPC_SUMMER;
} else {
return OLYMIPC_WINTER;
}
} else {
return OLYMIPC_NON;
}
}
Learning C language through suffering (Kushi C) is
This is the definitive introduction to the C language.
It systematically explains the basic functions of the C language.
The quality is equal to or higher than commercially available books.