1 / 7

Contoh soal kuis

Contoh soal kuis. Buatlah sebuah program untuk menukarkan isi 2 buah variable array bertipe char!. Misalkan sebuah variable array : double nilai [3][5] dipetakan dengan base address = 123456 ( dalam desimal ). Tentukanlah lokasi nilai [1][2] ( dalam desimal )

Télécharger la présentation

Contoh soal kuis

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. Contohsoalkuis

  2. Buatlahsebuahprogram untukmenukarkanisi2 buah variable array bertipe char!

  3. Misalkansebuah variable array : double nilai[3][5] dipetakandenganbase address= 123456 (dalamdesimal). Tentukanlahlokasinilai [1][2] (dalamdesimal) jikapemetaandengan CMO!

  4. Buatlahflowchartnya! • Seorangpegawai di Jepangsetiapharinaikkeretaapimenujutempatkerja. Kadangiaberkantor di cabang yang berlokasi di A, B, atau C. bahkankadangberpindahdarikantor A laluke B ataudari A ke C dalamsehari. Jarakdari A ke B = 10 Km, A ke C = 20 Km. Jarakdarirumahkekantor A, B, C masing2 yaitu 40, 50, 30 Km. jikaongkoskeretaRp 10.000 per Km. Berapakahbesarpengeluaranpegawaitersebutuntuktiba di kantorsetiaphari?

  5. Buatflowchartnya! • Seorangpengusaharumahmakansetiaphariharusmembelisejumlah Kg ayamuntukdimasakmenjadi 3 macammakanan, yaituayamgoreng, ayambakar, danayamkecap. • Tiap Kg ayam yang dibeli, menghasilkan 2 ayamgoreng, 1 ayambakardan 3 ayamkecap. Jika, jumlah yang dibeli< 5 Kg makaiaakanrugi, sehinggaharusbelilebihdariitu. AyamgorengdijualRp 5000,Ayam bakarRp 7000, danayamkecapRp 2500. HITUNG JUMLAH PENDAPATAN PENGUSAHA tersebut per hari!

  6. Tentukanlah output darikode program berikut: for (i=1; i<4;i++) { for (k=1; k<=i;k++) { If ( i==k) cout<<’0’; else cout<<’1’; } cout<<endl; }

  7. Buatlahkode program dari flowchart berikutini:

More Related