프로그래밍기초 및 실습 설계과제1 - 1. 24시간제로 시간을 입력하면 오전과 오후를 AM, PM 으로 구분, 2. 현재 시간에서 가장 가깝게 출발하는 비행기의 출발시간과 목적지 도착시간을 12시간제로
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

프로그래밍기초 및 실습 설계과제1 - 1. 24시간제로 시간을 입력하면 오전과 오후를 AM, PM 으로 구분, 2. 현재 시간에서 가장 가깝게 출발하는 비행기의 출발시간과 목적지 도착시간을 12시간제로에 대한 보고서 자료입니다.

목차

[1번]
1.문제정의
2.분석
3.설계
4)소스코드
5.수행결과

[2번]
1.문제정의
2.분석
3.설계
4.소스코드
5.수행결과

본문내용

rintf(\"Enter a 24-hour time: \");
scanf(\"%d %c %d\", &hour,&op,&minute);
time=(hour*60)+minute;
a=480-time;
b=583-time;
c=679-time;
d=767-time;
e=840-time;
f=945-time;
g=1140-time;
h=1305-time;
if(hour<10)
{
if (a<0)
printf(\"Closet departure time is 9:43 a.m.arriving at 11:52 a.m.\") ;
else
(a>b) ? printf(\"Closet departure time is 9:43 a.m.arriving at 11:52 a.m.\") :printf(\"Closet departure time is 8:00 a.m.arriving at 10:16 a.m.\");
}
if(hour>=10&&hour<13)
{
if(c<0)
printf(\"Closet departure time is 12:47 p.m.arriving at 3:00 p.m.\");
else
(c>d) ? printf(\"Closet departure time is 12:47 p.m.arriving at 3:00 p.m.\") :printf(\"Closet departure time is 11:19 a.m.arriving at 1:31 p.m.\");
}
if(hour>=13&&hour<16)
{
if(e<0)
printf(\"Closet departure time is 3:45 p.m.arriving at 5:55 p.m.\") ;
else
(e>f) ? printf(\"Closet departure time is 3:45 p.m.arriving at 5:55 p.m.\") :printf(\"Closet departure time is 2:00 p.m. arriving at 4:08 p.m.\");
}
if(hour>=16)
{
if(g<0)
printf(\"Closet departure time is 9:45 p.m.arriving at 11:58 p.m.\");
else
(g>h) ? printf(\"Closet departure time is 9:45 p.m.arriving at 11:58 p.m.\") :printf(\"Closet departure time is 7:00 p.m. arriving at 9:20 p.m.\");
}
return 0;
}
5.수행결과

추천자료

  • 가격4,200
  • 페이지수6페이지
  • 등록일2013.10.22
  • 저작시기2013.4
  • 파일형식한글(hwp)
  • 자료번호#887281
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니