03 Variabel, Tipe data operator (lanj).pdf -...

This preview shows page 1 - 9 out of 20 pages.

Image of page 1
¡ Bilangan yang mengandung pecahan desimal ¡ Contohnya? ¡ Nama tipe: real ¡ Operasi: Aritmatika & Perbandingan
Image of page 2
¡ Menghasilkan bilangan riil § + (tambah) § - (kurang) § * (kali) § / (bagi) § ^ (pangkat) ¡ Dibolehkan operasi campuran , bilangan riil dengan bilangan bulat à bil. bulat otomatis dikonversi ke riil
Image of page 3
¡ Menghasilkan nilai boolean § < (lebih kecil) § (lebih kecil atau sama dengan) § > (lebih besar) § (lebih besar atau sama dengan) § (tidak sama dengan) ¡ Pada konsep algoritmik, tidak ada operasi kesamaan (=) pada bilangan riil karena masalah perbedaan ketelitian bilangan ¡ Pada bahasa pemrograman aktualnya, mungkin dapat dipakai, dengan sangat hati-hati
Image of page 4
Tipe Rentang Nilai Format Real 2.9 x 10 -39 ..1.7x10 38 6 byte Single 1.5x10 -45 ..3.4x10 38 4 byte Double 5.0x10 -324 ..1.7x10 308 8 byte Extended 3.4x10 -4932 ..1.1x10 4932 10 byte
Image of page 5
¡ 6.4 + 5.7 ¡ 8.0 – 2.8 * 2 ¡ 10.0 / 3.0 ¡ 10 / 2.5 - 1 ¡ 0.003 < 0.3 ¡ 8.0 ≥ 5 ¡ 3.0 ≠ 3.5
Image of page 6
DEKLARASI a, b, c : real const pi = 3.14 PROGRAM VarKonstReal {Mempraktekkan deklarasi variabel dan konstanta real} ALGORITMA
Image of page 7
¡
Image of page 8
Image of page 9

You've reached the end of your free preview.

Want to read all 20 pages?

  • Spring '19
  • adi

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors