TAILIEUCHUNG - Programming HandBook part 83

Tham khảo tài liệu 'programming handbook part 83', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Choices C greeting Ilf age 20 What s up greeting age 20 What s up Hello Hello One line doesn t require End If no Else If language Then langType verbose Use to put two commands on same line If x 100 And y S Then x 5 y 2 Prefer red If x -f 100 And y .5 Then x 5 y 2 End If if x 100 Si y 5 f1 Mult ip1e st at ament s must in x 5 y 2 be enclosed or to break up any long single command use If henYouHaveAReally longLine And _ itNeedsToBeBrokenlntoZ Lines Then _ UseTheUnderscore charToEreakltUpj If x 5 Then x y Elself x Then x y Elself x 10 Then x - y Else x y End If Must be a primitive data type Select Case color Case black red r 1 Case blue if x 5 x y else if x S x y else if x x - y else x y J Must be inte ge r switch color case black case red break case blue break or string r Case green Cf i Case Else other 1 End Select other Pre-test Loops while c 1C c 1 End While Do Until c 10 c 1 Loop Post-test Loop Do While c 10 c 1 Loop Loops c Pre-test Loops while i 10 i for i 2 i 10 i 2 e L ine i Post-test Loop do i while i 10 For c 2 To 10 Step Z System. . Write Line c Next Ari ay or collection looping Dim names As String Steven SuOk1 Sarah For Each s As String In names s Next Array or collection looping string names Steven SuOk Sarah foreach string s m names s Arrays Dim nuns As Inte ge r 1 2. r 3 For i As Inte ge r 0 To en gth L nuns i Went c int nuns 1 2 3 for int i 0 i i nuns i 4 is the index of the last element so it holds 5 elements Dim nenes 4 As String names 0 Steven Throws 9fRangeExcaption names 5 Sarah S is the size of the array string names new str ing -5 f names ij 11 St even . T li r o w s S y s t e m. I n d e x 0 ut U f P. an g e E x c e p t i o n name s 5 115 ar ah C it c an 1t dynami c al ly resize an ar r ay. Resize the array keeping the existing values Preserve is optional ReDim .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.