Hisworld.tistory.com
The hisWorld
(140)
hisworld_new
(0)
hisOld
(138)
Android
(7)
Computer Vision
(18)
JAVA
(4)
C/C++
(26)
열혈강의 C
(32)
TCP/IP socket
(12)
WinAPI
(16)
System Programming
(0)
etc
(23)
Plan
(0)
hisWorld
(0)
hiStory
(0)
hiStudy
(0)
hiSnap
(0)
홈
태그
미디어로그
위치로그
방명록
Windows Live Messenger
winapi
Join C
대학생 공모전
The Turing test page
훈스닷넷
C/C++ Reference
WIKI
/
/
블로그 내 검색
도전프로그래밍 ONE-7
열혈강의 C 도전 프로그래밍 ONE - 7
2007.09.23
열혈강의 C 도전 프로그래밍 ONE - 7
URUZ-7
2007. 9. 23. 12:39
2007. 9. 23. 12:39
2
k
≤n 이 성립하는 최대 K값을 구해 출력하는 프로그램을 작성해 보자.
#include
#include
int main(void) { int i; double val; int n; int cnt=0; printf("상수 n 입력: "); scanf("%d",&n); for(i=1; ; i++) { printf("i = %d\n",i); val = pow(2,i); if(val<=n) { printf("val = %lf\n",val); cnt++; } else break; } printf("공식을 만족하는 k: %d\n",cnt); return 0; }
공유하기
게시글 관리
Hisworld.tistory.com
PREV
이전
1
NEXT
다음
+ Recent posts
Powered by
Tistory
, Designed by
wallel
Rss Feed
and
Twitter
,
Facebook
,
Youtube
,
Google+
티스토리툴바