Writer
-
성적출력Writer/WarmingUp Code 2008. 10. 7. 00:45
using System; class intstring { } class testman { public static void Main() { string i,strName=null, strKorean=null, strEnglish=null, strMath=null,number=null; // i = 출력할 학생수 //number = 번호선택 int strSum=0, numberInt=0 , cnt=0, cntPlus=-1 ,iInt; // float strAvg; Console.Write("출력할 학생수를 입력하세요 : "); i=Console.ReadLine(); Console.WriteLine(""); Console.WriteLine(" {0} 명의 학생을 출력할수있습니다 ",i); Console.Wr..
-
소스연습Writer/WarmingUp Code 2008. 10. 6. 21:19
using System; class student { public static void Main() { string strName = null, strKorean = null, strEnglish = null, strMath = null; int strSum = 0 , cnt=1; float strAvg = 0; while(cnt == 1) { Console.WriteLine("===================================="); Console.WriteLine("===================================="); Console.WriteLine("===이름 국어 영어 수학 총점 평균==="); Console.WriteLine("=====================..
-
프로퍼티 웜업소스Writer/WarmingUp Code 2008. 10. 5. 17:19
using System; using System.Collections.Generic; using System.Text; namespace pt1 { class Point1 { public int a; public int b; public Point1(int a,int b) { this.a = a; this.b = b; } } class Point2 { private int aa; private int bb; public void set(int aa,int bb) { this.aa = aa; this.bb = bb; } public int getaa() { return aa; } public int getbb() { return bb; } } class Point3 { private int xx; priv..
-
string ToString() bool float object enum boxing charWriter/WarmingUp Code 2008. 10. 4. 15:27
using System; class stringTest { public static void Main() { sting a = "제이름은"; string b = "전광식입니다"; string c = "강민주입니다"; string e = a+b; string f = a+c; int g = 2001; string h = "올해는" + g.ToString +"년입니다"; Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); } } using System; class objectTest { public static void Main() { object a = 22; object b = 3.14; objenct c = "abc"; Console.Write..
-
복습Writer/WarmingUp Code 2008. 10. 2. 19:48
/* class car//프로그램 세계에서는 개체를 하나의 데이터형으로간주 // car 데이터형 E또는 car형이라고 명명한 { public void Move() { } } class calss1 { static void Main() { car c = new car();// 객체 생성 new 연산자 이용 c.Move(); // Move 메서드 부르기 } } // 네임스페이스는 클래스를 분류할 때 사용 // ex) Vehicle.car // vehicle.airplane // 클래스와 네임스페이스 예제 namespace drawObject { class point { } class rectangle { } class ellipse { } } */ using System; //using drawObject;..
-
클래스 구조체Writer/WarmingUp Code 2008. 10. 1. 12:42
using System; class cstest { public static void Method1(ctime t) { t.hour =12; } public static void Method2(stime t) { t.hour=12; } public static void Main() { ctime c = new ctime(); c.hour= 9; Method1(c); Console.WriteLine("{0}",c.hour); stime s = new stime(); s.hour=9; Method2(); Console.WriteLine("{0}",s.hour); } } class ctime { public int hour; } struct stime { public int hour; } ///////////..