Makro

  • May 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 Makro as PDF for free.

More details

  • Words: 613
  • Pages: 14
Makro # Define #include <stdio.h> #include #include # define phi 3.14 # define luas(r) phi*r*r main() { cout<<"HITUNG LUAS LINGKARAN"<<endl; cout<<"Jika r=10 maka =>"<"<
# IF,#ENDIF,#ELIF,#ELSE #include <stdio.h> #include #include #define nilai 8 main() { #if nilai>10 cout<<"Nilai = "<
# UNDEF #include <stdio.h> #include #include # define nilai 10 #if nilai>10 #undef nilai #define nilai 11 #elif nilai<10 #undef nilai #define nilai 8 #else nilai==10 #undef nilai #define nilai 99 #endif main() { cout<<"Maka Nilai Update = "<
# IFDEF ,#IFNDEF #include <stdio.h> #include #include # define namaku "aye" # define namamu main() { #ifndef namamu cout<<"Panggil Namamu = "<
else if (strcmp(kd_buku,"SAD")==0||strcmp(kd_buku,"sad")==0) { judul="Sytem Analysis Design"; peng="Subagyo"; harga=100000; } else if (strcmp(kd_buku,"JAV")==0||strcmp(kd_buku,"jav")==0) { judul="Java Fundamental"; peng="Wahono"; harga=500000; } else { judul="=="; peng="=="; harga=0; }

if (jml_beli>9) { diskon=0.1*harga;} else if (jml_beli>6) { diskon=0.04*harga;} else { diskon=0.02*harga;} bayar=jml_beli*harga; pajak=0.05*harga; total=bayar-diskon+pajak; } menu() mulai cetak<<"Masukan Nama Pembeli = ";input>>pembeli; cetak<<"Masukan Kode Buku = ";input>>kd_buku; cetak<<"Masukan Jumlah Beli = ";input>>jml_beli;

buku(); clrscr(); cetak<<"Maka Nama Pembeli = "<
Makro
May 2020 17
Makro
June 2020 14
7_gizi Makro
June 2020 10
Vinos Makro
May 2020 6
Asgment3 Makro
December 2019 5
Ekonomi Makro
July 2020 27