Quick actions

cmd+k|ctrl+k

Navigation

Languages

program atribut

Snippet info

Language

Cpp

Visibility

public

Author

saffaanatunnajwa

Created

2024-08-31T04:43:39.117228Z

Updated

2024-08-31T04:45:02.585778Z

#include<iostream.h>
#include<conio.h>
class mobil
{
public:
    char merk[15]; 
   char warna[10];
   char jenis[10];
   int tahun;
   int no_mesin;
   int cc;
   int max_speed;
};

vold main()
{
clrscr();
mobil spek;
cout<<"merek Mobil = ";cin>>spek.merk;
cout<<"warna Mobil = ";cin>>spek.warna;
cout<<"Tahun Pembuatan = ";cin>>spek.tahun;
cout<<"Jenis Mobil = ";cin>>spek.jenis;
cout<<"Nomor Mesin = ";cin>>spek.no_mesin;
cout<<"CC mobil = ";cin>>spek.cc;
cout<<"Kecepatan maksimal = ";cin>>spek.max_speed;
clrscr();
cout<<"merek Mobil = "<<spek.merk<<endl;
cout<<"warna = "<<spek.warna<<endl;
cout<<"Tahun Pembuatan = "<<spek.tahun<<endl;
cout<<"Jenis = "<<spek.jenis<<endl;
cout<<"No Mesin = "<<spek.no_mesin<<endl;
cout<<"CC mobil = "<<spek.cc<<endl;
cout<<"Kecepatan Max = "<<spek.max_speed;cout<<" km/jam"<<endl;
getch();
}
INFO