1 / 9

Tipe data sederhana

Tipe data sederhana. Hermansyah,S.Kom. Tipe Data Standar. integer, real, karakter , string dan Boolean. Integer. @ Integer merupakan nilai bilangan bulat baik dalam bentuk decimal maupun hexadecimal. @ Tipe data integer meliputi :. Real.

Download Presentation

Tipe data sederhana

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tipe data sederhana Hermansyah,S.Kom

  2. Tipe Data Standar • integer, • real, • karakter, • string dan • Boolean.

  3. Integer @ Integer merupakannilaibilanganbulatbaikdalambentuk decimal maupun hexadecimal. @ Tipe data integer meliputi :

  4. Real • Digunakanuntukkeperluan data real (pecahan). • 5 buahjenis data real, yaitu: real, single, double, extended dan comp.

  5. Karakter • Tipe data char merupakantipe data yang mengandungsebuahkarakter. Karakterdapatberupasembarangelemendalam ASCII yang ditulisdiantarapetiktunggal.

  6. Tipe data string & Tipe data Boolean • Tipe data string berupasederetankarakter • Tipe data Boolean tipe data inihanyamengenalduabuahnilaisaja, yaitu true (benar) atau false (salah).

  7. Contoh Uses crt; Var C : integer; F : real; Begin Write (‘Berapacelcius : ’);readln(C ); F:=1.8*C+32; Writeln(C,’Celciusadalah’,F,’Fahrenheit’); Readln ; End.

  8. Latihan Program Luaslingkaran; Uses Crt; Var Jari_jari: integer; Luas:Real; Begin Clrscr; Write (‘Masukanjari_jarilingkaran:’);Readln(Jari_jari); Luas := 3.14*jari_jari*jari_jari ; Writeln (‘Luaslingkaranadalah =’,Luas:8:2); Readln; End. Catatan: CobagantiVarnya.

  9. TERIMA KASIH

More Related