Tugas1.docx

  • Uploaded by: Wuwuh Andini
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tugas1.docx as PDF for free.

More details

  • Words: 158
  • Pages: 8
TUGAS

PEMODELAN TEKNIK KIMIA (LANJUT)

Oleh :

Wuwuh Wijang Prihandini 1806154280

DEPARTEMEN TEKNIK KIMIA UNIVERSITAS INDONESIA DEPOK 2019

Cari persamaan kuadrat dari a. X2+x-6=0 b. X2-5x+6=0 Dengan VBA dan Pascal

VBA (Visual Basic Application) Buat program menggunakan Macro pada excell

Dengan :

-

Go Button :

Private Sub GOButton1_Click() D = (B * B) - 4 * A * C X1 = (-B + Sqr(D)) / (2 * A) X2 = (-B - Sqr(D)) / 2 / A End Sub

-

Quit Button

Private Sub QUITButton2_Click() UserForm1.Hide End Sub

-

Reset Button

Private Sub RESETButton3_Click() Unload UseForm1 UserForm1.Show End Sub

Sehingga akan digambar tampilan button untuk memulai proses run pada program persamaan yang diinginkan

a. X2+x-6=0

Klik GO untuk memunculkan nilai akar—akar yang dicari

b. X2-5x+6=0

PASCAL Program Persamaan_ABC; Var A,B,C:Extended; D,X1,X2:Extended; Procedure Hitung_X1_dan_X2(A,B,C:Extended;Var X1,X2:Extended); Var D:Extended; Begin D:=SQR(B)-4*A*C; X1:=(-B+SQRT(D))/(2*A); X2:=(-B-SQRT(D))/2/A; End; Begin {INPUT:} Write('A=');Readln(A); Write('B=');Readln(B); Write('C=');Readln(C);

{PROCESS:} Hitung_X1_dan_X2(A,B,C,X1,X2); {OUTPUT} Writeln('X1=',X1:0:4); Writeln('X2=',X2:0:4); Readln; End. a. X2+x-6=0

a. X2-5x+6=0

More Documents from "Wuwuh Andini"