그냥 그렇다고,,,

지금 이모냥이긴 한데,,,
이번주 내로 되겠지?? TTT주제에,,,

단순 다이렉트미디어 계층(Simple DirectMedia Layer), SDL은 C 프로그래밍 언어로 짜여진 크로스플랫폼 멀티미디어 라이브러리이다. 이 라이브러리는 비디오, 오디오, 사용자 입력 등의 계층을 추상화하여, 리눅스, 마이크로소프트 윈도, 맥 OS X 등 여러 운영체제에서 실행이 가능하도록 한다.
------------------------------------------------------------------------------------
일단 사회시간 쪽지시험보듯 빈칸채우기 문제가 있습니다.
뭐,, 간단한 것들이지만, C++을 한글로 공부했고 문제가 한글이었으면,
쉬웠을 문제지만, 문제가 영어이다보니, 한글로 공부했을때랑 어휘때문에,
해석에 애로가 꽃피더군요,,ㄷㄷ
다음은 간단한 질문(ex>string에서 두 문자열을 더하는 연산자는? 이라던가, 서로 같지 않음을 판별하는 논리연산자는 무엇인가? 같은)이 있고,
그다음 소스의 빈칸채우기,, 이거는 기존 숙제로 내주신 문제가 거의 그대로 나왔으니,, 숙제를 다시한번 점검해보세요,
마지막 하이라이트는 함수 만들기, 간단한 작업을 하는 함수(C++은 팩토리얼 함수를 구현하라더군요,,)를 직접 코딩해야됬습니다.
자바랑 C++은 담당 교수님이 같은분이니,, 같은 유형의 문제가 나올 확률이 높네요,, 자바 공부하시는 님들께 참조가 됬으면 좋겠습니다..
그리고 항상 궁금한거 있으시면 서의성 교수님이나 저에게 물어보면 친절히 답해드립니다.
H.P 010-2885-4585
nateon : dcmichael@nate.com
msn : dcmichael@live.co.kr
1. Julian dates. Suppose you would like to know how many days ago Columbus was born. It is tedious to figure this out by hand, because months have different lengths and because you have to worry about leap years. Many people, such as astronomers, who deal with dates a lot have become tired of dealing with the craziness of the calendar and instead represent days in a completely different way: the so-called Julian day number. That value is defined as the number of days that have elapsed since Jan. 1, 4713 B.C. A convenient reference point is that October 9, 1995, is Julian day 2,450,000.
Here is an algorithm to compute the Julian day number: Set jd, jm, jy to the day, month, and year. If the year is negative, add 1 to jy. (There was no year 0. Year 1 B.C. was immediately followed by year A.D. 1) If the month is larger than February, add 1 to jm. Otherwise, add 13 to jm and subtract 1 from jy. Then compute
long jul = floor(365.25 * jy) + floor(30.6001 * jm) + d + 1720995.0
We store the result in a variable of type long; simple integers may not have enough digits to hold the value. If the date was before October 15, 1582, return this value. Otherwise, perform the following correction:
int ja = 0.01 * jy;
jul = jul + 2 - ja + 0.25 * ja;
Now write a function
long julian(int year, int month, int day)
that converts a date into a Julian day number. Use that function in a program that prompts the user for a date in the past, then prints out how many days that is away from today's date.
2. Write a procedure void sort2(int& a, int& b) that swaps the values of a and b if a is greater than b and otherwise leaves a and b unchanged. For example,
int u = 2;
int v = 3;
int w = 4;
int x = 1;
sort2(u, v);
/* u is still 2, v is still 3 */
sort2(w, x);
/* w is now 1, x is now 4 */
이게 2번인데,,,
1번은 무슨 juliandate라는 만년력을 구하라는 문제 같고,,
2번은 간단히 크기가 작은것을 앞으로 큰것을 뒤로 보내는 문제 같네여,, C++은 BB를 보시면 교수님의 ppt도 있고, wiley에 보시면 교재도 있으니,, 참조변수에 관한것을 좀 보시는것이 도움이 되겠네요,,
Convert from: in Convert to: mm Value: 10 10 in = 254 mmUse the following class as your main class:
import java.util.Scanner;
/**
This class converts between two units.
*/
public class ConversionCalculator
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.println("Convert from:");
String fromUnit = in.nextLine();
System.out.println("Convert to:");
String toUnit = in.nextLine();
UnitConverter from = new UnitConverter(fromUnit);
UnitConverter to = new UnitConverter(toUnit);
System.out.println("Value:") ;
double val = in.nextDouble();
double meters = from.toMeters(val);
double converted = to.fromMeters(meters);
System.out.println(val+ " "+ fromUnit+ " = "+ converted
+ " "+ toUnit);
}
}