일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- 코딩
- 모의 주식
- frontend
- 코딩테스트
- C++
- SNS
- 이웃한 칸
- 코스닥
- 사물인터넷
- Reflex
- Python
- 코딩독학
- 자바독학
- java정리
- 프로그램
- 백준
- 개발
- 자바정리
- 빅데이터
- 프로그래머스
- 주가예측
- Project
- 프로그래밍
- backend
- 개발자
- 자바
- java
- 코테
- 개인프로젝트
- 풀스택프레임워크
- Today
- Total
목록C Programming (104)
Creative Code
#include int main(void) { int i =1; while (i
#include int main(void) { char ch; for (ch = 'A'; ch
#include int main(void) { char ch = 'A'; while (ch
#include int main(void) { int num; printf("정수입력 : \n"); scanf("%d",&num); /* if (num > 0){ printf("%d is positive \n",num); } else if (num == 0) { printf("%d is zero \n",num); } else { printf("%d is negative \n",num); } */ printf("%d is a %s num\n",num,(num>0) ? "positive" : (num == 0) ? "zero":"negative"); return 0; }
#include //삼항연산자 ? int main(void) { int score; printf("input score :"); scanf("%d",&score); /* if (score>=60){ //pass printf("score : %d --- pass \n",score); } else { //fail printf("score : %d --- fail \n",score); } */ printf("score : %d --- %s\n",score,(score >= 60) ? "pass" : "fail"); return 0; }
#include // 윤년인지 아닌지 판별 int main(void) { int year; printf("year :"); scanf("%d",&year); /* if ((year %4 == 0 || year%400 ==0) && year%100 != 0){ printf("%d is a leap year \n",year); } else { printf("%d is a ordinary year \n",year); } */ printf("%d is a %s year \n",year, ((year %4 == 0 || year%400 ==0) && year%100 != 0) ? "Leap" :"Ordinary"); return 0; }