Advertisement
gunawantw

menghitung keliling dan luas persegi panjang bagian 1

May 25th, 2019
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.62 KB | None | 0 0
  1. #include <Constants.au3>
  2.  
  3. $applName = "Menghitung luas dan keliling bangun persegi-panjang"
  4. $panjang = InputBox($applName, "Masukan panjang (cm)",6)
  5. $lebar = InputBox($applName, "Masukan lebar (cm)",5)
  6. $luas = $panjang * $lebar
  7. $keliling = 2 * ($panjang+$lebar)
  8.  
  9. $textPanjang = "Panjang " & $panjang & " cm. " & CHR(13)
  10. $textLebar = "Lebar " & $lebar & " cm." & chr(13) & chr(13)
  11.  
  12. $textKeliling = "Maka, keliingnya adalah " & $keliling & " cm." & Chr(13)
  13. $textLuas = "Dan luasnya adalah " & $luas & " cm2."
  14.  
  15. $textHasil = $textPanjang & $textLebar & $textKeliling & $textLuas
  16.  
  17. MsgBox($MB_SYSTEMMODAL, $applName, $textHasil)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement