한국항공대 1학년 프로그래밍
- 최초 등록일
- 2006.10.23
- 최종 저작일
- 2006.10
- C언어
- 가격 1,000원
소개글
한국항공대 프로그래밍 과제1입니다.
주석 안달렸습니다. 주석달린 버전을 원하시면 메일날려주세요.
컴파일 실행환경
비주얼 스튜디오 6.0
본문내용
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <math.h>
#define MAX 361
#define WIND 60
#define TORNADO 6
double rand_float(double min, double max)
{
double temp;
if(max < min)//swap
{
temp = max;
max = min;
min = temp;
}
temp = (max + min) / 2.0; // Average
return temp + (temp - min) * sin((double)rand());
}
void print_histogram(int minutes, int wind)
{
int index;
printf("%3d : ",minutes);
for(index = 0; index < wind; index++)
printf("*");
printf("\n");
}
void main()
{
int index;
int x;
int y;
int Wind;
int WinCounter = 0;
int WindState = 1;
int PercentToWind = 2;
int Tornado;
int TornadoState = 1;
int PercentToTornado = 3;
참고 자료
없음