Develop
2003.04.23 00:06
[vb] 비쥬얼 베이직으로..
Views 53135 Comment 0
DefSng A-Z
Dim a(7), b(7) As String, c(7), d(7) As String, e(7), f(7), g(7), h(7), k(7), af(7), bf(7), cf(7), aft(7), bft(7), cft(7), tmp As Variant, ct, a1(7), b1(7) As String, c1(7), z As String
----------------------------------------------------------------
Private Sub Command1_Click()
ct = ct + 1
a(ct) = Text1.Text
b(ct) = Text2.Text
c(ct) = Text3.Text
a1(ct) = Text1.Text
b1(ct) = Text2.Text
c1(ct) = Text3.Text
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub
----------------------------------------------------------------
Private Sub Command2_Click()
For i = i To ct - 1
For j = i + 1 To ct
If b(i) > b(j) Then
tmp = a(i): a(i) = a(j): a(j) = tmp
tmp = b(i): b(i) = b(j): b(j) = tmp
tmp = c(i): c(i) = c(j): c(j) = tmp
End If
Next j
Next i
For i = i To ct
Select Case a(i)
Case "501": z = "A"
Case "502": z = "C"
Case "503": z = "A"
Case "504": z = "B"
Case "505": z = "B"
Case "506": z = "B"
Case "507": z = "C"
Case "508": z = "A"
Case "509": z = "C"
Case "510": z = "A"
End Select
e(i) = c(i)
Select Case UCase(b(i))
Case "PA": d(i) = "모니터": x = 99: y = 8000
Case "PB": d(i) = "키보드": x = 35: y = 7000
Case "PC": d(i) = "마우스": x = 95: y = 6000
Case "PD": d(i) = "CPU": x = 85: y = 14000
Case "PE": d(i) = "스캐너": x = 28: y = 61000
Case "PF": d(i) = "프린터": x = 16: y = 3000
Case "PG": d(i) = "메모리": x = 150: y = 35000
Case "PH": d(i) = "모뎀": x = 168: y = 16000
End Select
aft(i) = af(i) * y
bft(i) = bf(i) * y
cft(i) = cf(i) * y
k(i) = Int((e(i) / x) * 100 + 0.5)
Next i
Form1.Hide
Form2.Show
Form2.Print "비번호 : 004666"
Form2.Print ""
Form2.Print "판매제품, 판매수량, A등급판매금액, B등급판매금액, C등급판매금액, 판매율"
For i = 1 To ct
Form2.Print d(i), e(i), aft(i), bft(i), cft(i), k(i)
Next i
Form2.Print ""
Form2.Print "입력자료"
For i = 1 To ct
Form2.Print a1(i), b1(i), c1(i)
Next i
End Sub
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
84 | Develop | [ios] 아이폰용 앱 오픈 소스들 | hooni | 2013.04.23 | 470249 |
83 | Develop | [ios] 언어, 지역, 국가 설정 가져오기 | hooni | 2014.05.12 | 272300 |
82 | Develop |
[android] 만화 어플 소스코드
![]() |
hooni | 2013.04.23 | 92925 |
81 | Algorithm | 디피헬만(Diffie-Hellman) 초간단 개념.. | hooni | 2013.04.23 | 81105 |
80 | Develop |
[c#] Hashtable <-> Json (dll 포함)
![]() |
hooni | 2013.04.23 | 80731 |
79 | Develop | [C#] MD5, SHA1 해시 & 인코딩 | hooni | 2013.04.23 | 77968 |
78 | Develop |
[android] 점심 해결 앱 소스 코드 ㅋㅋ
![]() |
hooni | 2013.04.23 | 76506 |
77 | PPT |
[android] XML파서(XMLParser)의 종류와 성능 비교에 대한 발표 자료
![]() |
hooni | 2013.04.23 | 75722 |
76 | Develop |
[json] 종결자 (설명과 웹, C/C++/C# 프로그램 샘플 코드)
![]() |
hooni | 2013.04.23 | 72047 |
75 | Develop | [ios] Random Thoughts: Rand() vs. arc4random() | hooni | 2013.10.31 | 68125 |
74 | Develop | [vb] 비주얼 베이직 자격증용 ㅎㅎ | hooni | 2003.04.23 | 61595 |
73 | Develop | [android] Canvas를 이용해 이미지 확대/축소 하기 | hooni | 2013.04.23 | 60799 |