🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: cn.bbs.comp.lang.visual-basic
1 messages
1 total messages Started by panfock Fri, 27 Apr 2007 17:06
Re: �������DO LOOPѭ��������!!!�����!!!
#54
Author: panfock
Date: Fri, 27 Apr 2007 17:06
34 lines
1592 bytes
�� �� zzuli. �Ĵ������ᵽ: ��
: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
:         Dim m1, n1, m, n, r
:         n1 = InputBox("����n1")
:         m1 = InputBox("����m1")
:         If m1 > n1 Then
:             m = m1 : n = n1
:         Else
:             m = n1 : n = m1
: ...................

Dim m1, n1, m, n, r As Integer
        n1 = Val(InputBox("����n1"))
        m1 = Val(InputBox("����m1"))
        r = n: n = n1: m = m1
        Do
            If n > m Then
              r = m: m = n: n = r
            End If
            r = m - n
            m = n
            n = r
        Loop Until r = 0
        TextBox1.Text = m
        TextBox2.Text = m1 * n1 / m

--
pppppp ffffff
nnnnnn oooooo
aaaaaa cccccc
kkkkkkkkkkkkk

�� ��Դ ����ɾ�bbsվ http://bbs.scau.edu.cn [FROM: 202.116.160.*]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads