Develop
2003.04.23 00:05
[vb] 비쥬얼 베이직 기출 문제 연습2
조회 수 54456 댓글 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
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
49 | Develop | [c] Mac OS 에 gmp(gmp.h) 라이브러리 설치 | hooni | 2016.10.03 | 1452 |
48 | Develop |
[ios] Requesting Location Permissions in iOS
![]() |
hooni | 2018.08.18 | 1746 |
47 | Develop |
[ios] 동영상 플레이어 샘플 (for Remote Url)
![]() |
hooni | 2017.02.07 | 1770 |
46 | Develop |
[ios] 웹뷰 history.back() ㅋㄷ
![]() |
hooni | 2016.06.27 | 2048 |
45 | Develop |
[matlab] ZigZag-Scanning (2-D Array)
![]() |
hooni | 2016.10.15 | 2122 |
44 | Develop |
[ios] 기본 네비게이션바의 타이틀, back버튼 위치와 속성 변경
![]() |
hooni | 2016.05.16 | 2200 |
43 | Develop |
XML, JSON, BSON, MSGPACK 장,단점 비교
![]() |
hooni | 2017.01.11 | 2385 |
42 | Develop | [android] dp, px 서로 변환 | hooni | 2016.10.21 | 3510 |
41 | Develop |
[ios] UUID 생성 + Key Chain 연동
![]() |
hooni | 2016.05.13 | 4793 |
40 | Develop |
[ios][swift] 초간단 카달로그 앱 (Catalog App)
![]() |
hooni | 2016.06.27 | 7460 |
39 | Develop | [c] 프로세스 검사하기 | hooni | 2013.04.23 | 8051 |
38 | Develop |
Mac OS 에 Jenkins 설치하기 (Homebrew)
2 ![]() |
hooni | 2017.03.15 | 8410 |