Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

vb »úƱ¶©¹ºÏµÍ³

ÌâÄ¿£ºÒ»¼ÒСÐͺ½¿Õ¹«Ë¾¸Õ¸Õ¹ºÂòÁËһ̨¼ÆËã»ú£¬ÒÔʹÓÃеĻúƱ×Ô¶¯Ô¤¶©ÏµÍ³£¬Õâ¼Ò¹«Ë¾ÒªÇóÎÒÃÇ¿ª·¢Õâ¸öÐÂϵͳ¡£ÎÒÃÇÐèÒª±àдһ¸öÓ¦ÓóÌÐò£¬¶ÔÕâ¼Òº½¿Õ¹«Ë¾Î¨Ò»µÄÒ»¼Ü·É»ú£¨ÈÝÁ¿Îª10¸ö×ù룩µÄÿ¸öº½°à·ÖÅä×ùλ¡£Õâ¸öÓ¦ÓóÌÐòÓ¦¸ÃÊäÈëÏÂÃæÕâЩѡÏÇëÊäÈë1Ñ¡ÔñÍ·µÈ²ÕºÍÇëÊäÈë2Ñ¡Ôñ¾­¼Ã²Õ¡£Èç¹ûÓû§ÊäÈë1£¬Ó¦ÓóÌÐòÓ¦¸Ã·ÖÅäÒ»¸öλÓÚÍ·µÈ²ÕµÄ×ù루×ùλ1~5£©¡£Èç¹ûÓû§ÊäÈë2£¬Ó¦ÓóÌÐòÓ¦¸Ã·ÖÅäÒ»¸öλÓÚ¾­¼Ã²ÕµÄ×ù루×ùλ6~10£©¡£È»ºó£¬Õâ¸öÓ¦ÓóÌÐòÓ¦¸ÃÏÔʾһÕŵǻúÖ¤£¬×¢Ã÷Óû§µÄ×ùλºÅÂë¼°ËüλÓÚ·É»úÉϵÄÍ·µÈ²Õ»¹ÊǾ­¼Ã²Õ¡£
ʹÓÃÒ»¸ö»ù±¾ÀàÐÍBooleanµÄһάÊý×éÀ´±íʾÕâÕÅ·É»úµÄ×ùλͼ¡£°ÑÕâ¸öÊý×éµÄËùÓÐÔªËسõʼ»¯Îªfalse£¬±íʾÕâЩ×ùλ¶¼Êǿյġ£·ÖÅäÿ¸ö×ùλºó£¬°Ñ¶ÔÓ¦µÄÊý×éÔªËØÉèÖÃΪTrue£¬±íʾÕâ¸ö×ùλÒѾ­±»Ô¤¶©¡£Õâ¸öÓ¦ÓóÌÐò²»ÄÜ·ÖÅäÒѾ­±»·ÖÅäµÄ×ùλ¡£µ±¾­¼Ã²ÕÂúÔ±Ö®ºó£¬Ó¦ÓóÌÐòÓ¦¸ÃѯÎÊÓû§ÊÇ·ñ½ÓÊÜÍ·µÈ²Õ£¨·´Ö®ÒàÈ»£©¡£Èç¹ûÊÇ£¬¾Í½øÐÐÊʵ±µÄ×ùλ·ÖÅä¡£Èç¹û²»ÊÇ£¬¾ÍÏÔʾÐÅÏ¢“ÏÂÒ»º½°àÔÚ3Сʱ֮ºó”
Public Class flight
Dim seats As Boolean() = New Boolean(9) {False, False, False, False, False, False, False, False, False, False}
Public Sub process()
Dim a = 0
For i As Integer = 0 To 9
If seats(i) = False Then
a = 1
Exit For
End If
Next
If a = 0 Then
full()
End If
Console.Write("ÇëÊäÈë1Ñ¡ÔñÍ·µÈ²Õ£¬ÇëÊäÈë2Ñ¡Ôñ¾­¼Ã²Õ: ")
Dim readnumber As Integer
readnumber = Convert.ToInt32(Console.ReadLine())
Console.WriteLine()
If readnumber = 1 Then
firstclass()
End If
If readnumber = 2 Then
economy()
Else
Exit Sub
End If
End Sub
Public Sub firstclass()
For i As Integer = 0 To 4 Step 1
If seats(i) = False Then
seats(i) = True
Console.Write("Í·µÈ²Õ" & i + 1 & "×ø")
Console.WriteLine()
Console.WriteLine()
process()
Exit For
End If
N


Ïà¹ØÎĵµ£º

VB¶ÔINIÎļþ²Ù×÷

VB¶ÔINIÎļþ²Ù×÷
2009-02-25 00:17
INI ÎļþÊÇʲôÑù×Ó£¿——²»»á°É£¬Õⶼ²»ÖªµÀ¡£INI Îļþ¾ÍÊÇ Windows Öг£¼û
µÄÒÔ .ini ΪÀ©Õ¹ÃûµÄÎļþ£¬ÆäÄÚ²¿¸ñʽºÍ¸÷²¿·ÖµÄÃû³ÆÈçÏ£º
[Section1]
Key1=Value1
Key2=Value2
Key3=Vlaue3
[Section2]
Key1=Value1
Key2=Value5
Key4=Value4
Key5=...
...
 & ......

ÔÙ̸ÓÃVBÎÞ´°¿Ú͸Ã÷Usercontrol±àд͸Ã÷¸¡¶¯°´Å¥

'* ************************************************************** *
'* ³ÌÐòÃû³Æ£ºButton.ctl
'* ³ÌÐò¹¦ÄÜ£ºÍ¸Ã÷¸¡¶¯°´Å¤
'* ×÷Õߣºlyserver£¬×îºóÐÞ¸ÄÈÕÆÚ£º2009Äê11ÔÂ
'* ÁªÏµ·½Ê½£ºhttp://blog.csdn.net/lyserver
'* ************************************************************ ......

VBʵÏÖ¿ÉÖ´ÐÐÎļþÔËÐÐʱ×Ôɾ³ý

    ÓÐʱ£¬ÎªÁËʵÏÖ¶¯Ì¬¸üУ¬ÎÒÃÇÐèÒª¶ÔÕý´¦ÓÚÔËÐÐ״̬µÄÓ¦ÓóÌÐò½øÐÐ×Ôɾ³ý£¬¾ÍÏñ360°²È«ÎÀÊ¿ÔÚÏßÉý¼¶ÄÇÑù¡£µ«ÊÇ£¬WindowsÊDz»ÔÊÐíɾ³ýÕý´¦ÓÚÔËÐÐ״̬µÄÓ¦ÓóÌÐòµÄ£¬Ôõô°ì£¿Ò»°ãÀ´Ëµ£¬ÎÒÃÇ¿ÉÒÔʹÓÃÁ½¸ö³ÌÐòÀ´ÊµÏÖ£¬Ò»¸öרߺÔð°æ±¾¼ì²âºÍɾ³ý£¬Ò»¸ö²ÅÊÇÒµÎñÐèÒªµÄÖ÷Ó¦ÓóÌÐò¡£Äܲ»Äܽ«¶þÕߺ϶þΪһÄØ£¿´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ