NAME : YOGA AFIF NURRAHMAN
Imports [Link] Imports System Imports [Link] Module Module1 Dim a As String Dim choice As String Sub Main() 'bagian 1 tanya() While a <> "x" If a = "a" Then file2() End If ' if untuk si "a" If a = "b" Then [Link]("UserName: [Link]) [Link]("SystemDirectory: [Link]) [Link]("OSVersion: [Link]) [Link]("MachineName: [Link]) [Link]() tanya() End If
" & " & " & " &
If a = "c" Then Dim loopCounter, x, y, a, b, c, n As Decimal Dim nama, lokasi, join, gabung As String [Link]("How many times do you want? ") n = [Link]()
For loopCounter = 1 To n [Link]("Input a: ") a = [Link]() [Link]("Input b: ") b = [Link]() [Link]("Input c: ") c = [Link]() y = (b ^ -(4 * a * c)) x = (-b + ((Sqrt(y)))) / (2 * a) [Link]("The Result is: " & x) [Link]() Next [Link]("input file (example:[Link]) : ") nama = [Link]() [Link]("input lokasi(example: d:\ ) : ") lokasi = [Link]() Join = lokasi & nama gabung = a & b & c & x
If [Link](Join) = True Then [Link]() [Link]("file : " & join & " sudah ada") [Link]("the a value : " & a) [Link]("the b value : " & b) [Link]("the c value : " & c) [Link]("the result by the formula : " & x) [Link](Join, a & b & c & x, False) [Link]("data anda telah tesimpan ") [Link]("isi file: " & join & " adalah " & [Link](join)) [Link]() tanya() End If End If If a = "d" Then pilihan() If choice = "a" Then [Link]("[Link]") ElseIf choice = "b" Then [Link]("[Link]") ElseIf choice = "c" Then [Link]("[Link]") End If End If tanya() If a <> "a" And a <> "x" And a <> "b" Then tanya() End If End While End Sub Sub tanya() [Link]("choice : ") [Link]("") [Link]("a. input file") [Link]("b. computer system") [Link]("c. program with input") [Link]("d. running a program") [Link]("x. exit") [Link]("") [Link]("input your choice: ") a = [Link]() End Sub Sub pilihan() [Link]("which program do you want to run ?") [Link]("") [Link]("a. calculator") [Link]("b. Command prompt") [Link]("c. notepad") [Link]("") [Link]("your choice: ") choice = [Link]() End Sub Sub file2()
Dim nama, lokasi, gabung As String Dim fileDetail As [Link] [Link]("input file (example:[Link]) : ") nama = [Link]() [Link]("input lokasi(example: d:\ ) : ") lokasi = [Link]() gabung = lokasi & nama
If [Link](gabung) = True Then [Link]() [Link]("file :" + gabung + " sudah ada") [Link]("==============================================") [Link](" information file") [Link]("file dibuat tanggal =" & [Link](gabung)) [Link]("file terakhir ditulis = " & [Link](gabung)) [Link]("file terakhir diakses =" & [Link](gabung)) fileDetail = [Link](gabung) [Link]("ukuran file " & gabung & " Size: " & [Link] & " byte(s)") [Link]() tanya() Else [Link]() [Link]("file yang anda input: " + gabung + " tidak ada") [Link]() tanya() End If End Sub End Module