0% found this document useful (0 votes)
6 views3 pages

Interactive File Management Program

This document contains code for a Visual Basic program with the following functionality: 1. It presents a menu with options to input a file, view system information, run a formula program, or launch other programs. 2. The formula program option allows the user to input values for variables a, b, and c and calculates the result of a quadratic formula. 3. Other options allow viewing file details, launching calculators or other apps, and saving the formula results to a text file. 4. It uses loops and conditional logic like If/Else statements to control program flow based on user input.

Uploaded by

Pusdatin Fst
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Interactive File Management Program

This document contains code for a Visual Basic program with the following functionality: 1. It presents a menu with options to input a file, view system information, run a formula program, or launch other programs. 2. The formula program option allows the user to input values for variables a, b, and c and calculates the result of a quadratic formula. 3. Other options allow viewing file details, launching calculators or other apps, and saving the formula results to a text file. 4. It uses loops and conditional logic like If/Else statements to control program flow based on user input.

Uploaded by

Pusdatin Fst
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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

You might also like