분류 전체보기(688)
-
에라토스테네스의 체(Stieve of Eratosthenes) 에 근거한 소수 구하기
#include #define SIZE 100 void crossOut(int *s, int interval, int start){ int i; for (i = start; i < SIZE; i += interval){ s[i] = 0; } } void main(){ int prime[SIZE] = { 0 }; int i, j; printf("Table of primes to 100\n"); prime[0] = 0; for (i = 2; i < SIZE; i++) prime[i] = 1; for (i = 2; i < SIZE; i++){ crossOut(prime, i, i+i); } for (j = 3; j < SIZE; j++){ crossOut(prime, i, i+i); } for (i = 0; ..
2008.04.01 -
처음으로 만든 Windows Console Application
using System; using System.Collections.Generic; using System.Text; namespace 잇힝유후 { public class FirstCsApp { static bool isContinued = true; public static void Main(String[] args) { while (isContinued) { Console.WriteLine("What's your favorite day of the Week? ex) Monday, Tuseday, Wed, thursday"); try { String msg = (string)Console.ReadLine(); String parsedMsg = msg.ToUpper().Substring(0, 2); v..
2008.04.01 -
책안보고 막 코딩하기..
using System; using System.Collections.Generic; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static String getGreetingMsg() { return "안녕 이세상아"; } static String getGreetingMsg(String msg) { String tempMsg = msg; return tempMsg; } static void Main(string[] args) { ArrayList list = new ArrayList(); list.Add("Hello"); list.Add("World"); String temp = P..
2008.03.31 -
C# 시작..
많은 프로그래밍 언어들 중에서.. 자바라는 프로그래밍 언어로 처음 시작을 한 나는 일찌감치 객체지향 프로그래밍 이라는 것을 접했다. 뭐 어샘블리나 기계어를 먼저 배우는게 먼저라고 생각하는 건 아니지만, C 언어를 먼저 배우는 편이 더 낫지 않았나 싶다. 절차지향 프로그래밍 언어인 C 에 대해서 조금 소감을 말하자면, 특히 포인터라는 것을 통해서 Call by Value와 Call by reference 를 구분지을 수 있고, 왜 자바의 GC 가 훌륭한지에 대해서도 다시한번 생각해 볼 수 있을것이다. 아직 포인터라는 것이 엄청 낯설긴 하지만 조금씩 감이 온다. 어떤 언어가 더 좋다고 말을 할 수가 없다. 당연히 자바가 최고일 것이라고 생각했던 우물안 개구리가.. 우물을 뛰쳐 나오니까 이런저런 우물들이 많다..
2008.03.31 -
3. 24. 4학년 1학기, 내 주변의 사람들..
메롱 남자 뚱한 가오나시 불만 잇는 재영니마 ♡
2008.03.31 -
연습문제 13번 : 난수발생, 정수 갯수 세기
#include #include void display(int occurList[], int size); void validateNum(int numList[], int occurList[], int occurListSize); void display(int occurList[], int size){ int i = 0; for (i = 0 ; i < size ; i ++) if (occurList[i] != 0) printf("%d 는%d 번있었습니다.\n", i+1, occurList[i]); } void validateNum(int numList[], int occurList[], int occurListSize){ int i, temp; for (i = 0 ; i < 7 ; i ++){ temp =..
2008.03.28