Contoh program input output


#include<iostream.h>

#include<conio.h>

main()

{

char nama[20],kode,judul[15],pengarang[20],tahun[5];

long int harga,total;

int jumlah;

cout<<“Tampilan Input Program”<<endl<<endl;

cout<<“Nama Pembeli  :”;cin>>nama;

cout<<“Kode Buku                  :”;cin>>kode;

cout<<“Judul buku                    :”;cin>>judul;

cout<<“Pengarang                    :”;cin>>pengarang;

cout<<“Tahun terbit      :”;cin>>tahun;

cout<<“Harga                           :”;cin>>harga;

cout<<“Jumlah Beli       :”;cin>>jumlah;

total=harga*jumlah;

clrscr();

cout<<“Tampilan Output Program”<<endl<<endl;

cout<<“Nama                           :”<<nama<<endl;

cout<<“kode                :”<<kode<<endl;

cout<<“Judul                :”<<judul<<endl;

cout<<“Pengarang        :”<<pengarang<<endl;

cout<<“Tahun               :”<<tahun<<endl;

cout<<“Harga               :”<<harga<<endl;

cout<<“jumlah              :”<<jumlah<<endl;

cout<<“Total Pembayaran:”<<total<<endl<<endl;

cout<<“********Terima Kasih*************”;

getch();

}

2 Responses to Contoh program input output

  1. mbleg says:

    nggak bisa d’RUN om….

Terima Kasih Atas Komentar Yang Di Berikan Semoga Bermanfaat !!!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s