목록분류 전체보기 (351)
printf("ho_tari\n");
#include int main(void) { int year; scanf("%d", &year); int isOrdinary = !(year % 4 == 0 && year % 100 != 0 || year % 400 == 0); //int isOrdinary = (year % 4 != 0 || year % 100 == 0 && year % 400 == 0); printf("%d is a ordinary : %d\n", year, isOrdinary); return 0; }
#include int main(void) { int year; scanf("%d", &year); int isLeap = (year % 4 == 0 && year % 100 != 0 || year % 400 == 0); //int isLeap = (year % 400 == 0 || year % 4 == 0 && year % 100 != 0); printf("%d is leap : %d\n", year, isLeap); return 0; }
#include int main(void) { int a, b; a = 1; b = ++a; printf("a: %d\tb: %d\n", a, b); a = 1; b = a++; printf("a: %d\tb: %d\n", a, b); return 0; }
#include int main(void) { char c; scanf("%c", &c); int isAlphabet = ((c >= 'A' && c = 'a' && c
#include int main(void) { int man, woman; printf("Man: "); scanf("%d", &man); printf("Woman: "); scanf("%d", &woman); double manratio, womanratio; manratio = 100.0 * man / (man + woman); womanratio = 100.0 * woman / (man + woman); printf("----------------------------\n"); printf("Ratio of Man : %.2f%%\nRatio of Woman : %.2f%%\n", manratio, womanratio); return 0; } #include int main(void) { int m..