1 / 4

Perintah Input- OutPut

Perintah Input- OutPut. Pertemuan 4. Perintah Output. Perintah yang digunakan untuk mengeluarkan hasil proses komputer sehingga bisa dibaca oleh si pemakai (user). Salah satu untuk menampilkan output dalam turbo C++ adalah fungsi “ Printf ( )”.

topper
Download Presentation

Perintah Input- OutPut

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. Perintah Input-OutPut Pertemuan 4

  2. Perintah Output • Perintah yang digunakanuntukmengeluarkanhasilproseskomputersehinggabisadibacaolehsipemakai (user). Salahsatuuntukmenampilkan output dalam turbo C++ adalahfungsi “ Printf( )”. • Prinfdigunakanuntukmencetak data baikberupateks, numerik, kostantamaupunvariabel.

  3. Contoh Program #include <stdio.h> #include <conio.h> #include <string.h> void main() { intjumlah ; float total_nilai, rata ; char nilai_huruf; char nama[20]; clrscr(); /* inisialisasivariabel*/ jumlah = 5; strcpy (nama, "AisyaAqillaDeska"); total_nilai=485.6; rata= total_nilai / jumlah ; nilai_huruf='A'; printf (" researchor :%s \n", nama); printf (" jumlah data yang ada :%d data.\n", jumlah); printf (" total nilai yang diperoleh :%5.2f \n", total_nilai); printf (" rata-rata nilainya :%7.1f \n", rata); printf (" nilaihurufnya :%c \n",nilai_huruf); getch (); }

More Related