Develop
2003.04.23 00:05
[vb] 비쥬얼 베이직 기출 문제 연습2
Views 54456 Comment 0
DefSng A-Z
Dim a(10), b(10), c(10), d(10) As String, e(10), f(10), g(10), h(10), l(10), pc, a1(10), b1(10), c1(10), tmp As Variant
Private Sub Command1_Click()
pc = pc + 1
a(pc) = Text1.Text
b(pc) = Text2.Text
c(pc) = Text3.Text
a1(pc) = Text1.Text
b1(pc) = Text2.Text
c1(pc) = Text3.Text
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
End Sub
Private Sub Command2_Click()
For i = 1 To pc - 1
For j = i + 1 To pc
If a(i) > a(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 = 1 To pc
e(i) = c(i) * 20000
If b(i) = 21 Then
d(i) = "사원"
x = 1000000
Select Case e(i)
Case Is >= 1000000: f(i) = 50000
Case Is >= 500000: f(i) = 30000
Case Is < 500000: f(i) = 0
End Select
Else
d(i) = "대리"
x = 1500000
Select Case e(i)
Case Is >= 1000000: f(i) = 100000
Case Is >= 500000: f(i) = 50000
Case Is < 500000: f(i) = 0
End Select
End If
g(i) = x + f(i)
Next
For i = 1 To pc
s = 1
For j = 1 To pc
If g(i) < g(j) Then
s = s + 1
End If
Next
h(i) = s
Next
Form1.Hide
Form2.Show
Form2.Print "비번호: 123"
Form2.Print "사원번호", "직위", "매출금", "보너스", "총합계", "순위"
For i = 1 To pc
Form2.Print a(i), d(i), e(i), f(i), g(i), h(i)
Next
Form2.Print ""
Form2.Print "입력자료"
For i = 1 To pc
Form2.Print a1(i), b1(i), c1(i)
Next
End Sub
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
49 | Develop | [io] Apple Watch, Today Extension 앱ID 설정 | hooni | 2016.04.20 | 948 |
48 | Develop | [ios] 문자열로 함수 실행하기 (eval 함수처럼) | hooni | 2015.02.10 | 937 |
47 | Develop | [ios] URL 랜딩 속도(OpenURL 10초 정지되는) 이슈 | hooni | 2015.02.09 | 932 |
46 | Develop | [ios] Thread Loop 내에서 UI 업데이트 방법 | hooni | 2015.01.03 | 929 |
45 | Develop | [linux] CentOS Apache 웹서버에 HTTPS 적용 | hooni | 2015.10.23 | 929 |
44 | Develop | [ios] GMT Date와 Local Date 변환하기 | hooni | 2015.04.07 | 923 |
43 | Develop |
[js] e.stopPropagation() VS e.preventDefault ()
![]() |
hooni | 2015.04.14 | 918 |
42 | Develop | [ios] 비동기 블럭 코드 예제 | hooni | 2014.11.21 | 906 |
41 | Develop | [Android Error] The number of method references in a .dex file cannot exceed 64K | hooni | 2016.11.10 | 904 |
40 | Develop |
[c] 파일명 또는 특정 패턴을 적용
![]() |
hooni | 2016.08.03 | 900 |
39 | Develop |
캘리포니아 운전면허 족보
![]() |
hooni | 2017.06.12 | 897 |
38 | Develop |
리팩토링 계획안
![]() |
hooni | 2017.05.15 | 887 |