Selasa, 25 September 2012

C++

Contoh Program C++

#include<stdio.h>
#include<conio.h>
#include<iostream.h>

main()

{

printf("***JUSTICE CELL***");
printf("\n\n***DATA HANDPHONE***");
printf("\n\n======================");
getch();

                                        
char nm[10],mrk[10],jnis[10],hrg[10];

clrscr();
cout<<"nama handphone          :";cin>>nm;
cout<<"merk handphone          :";gets(mrk);
cout<<"jenis handphone         :";cin>>jnis;
cout<<"harga jual              :";gets(hrg);
printf("\n\n");
cout<<"handphone dengan tipe   :"<<nm<<endl;
cout<<"dengan merk             :"<<mrk<<endl;
cout<<"merupakan jenis hp      :"<<jnis<<endl;
cout<<"seharga                 :"<<hrg<<endl;

getch();

}