#include<iostream>
using namespace std;
int main()
{
char kode,ukuran,merk[15];
long harga=0;
cout<<"Kode Baju : ";cin>>kode;
cout<<"Ukuran : ";cin>>ukuran;
if (kode=='1')
{
strcpy(merk,"H & R");
if (ukuran=='S' || ukuran =='s')
harga=65000;
else
harga=80000;
}
else if (kode=='2')
{
strcpy(merk," Adidas");
if (ukuran=='S' || ukuran == 's')
harga=85000;
else
harga=95000;
}
else
cout<<"------------------------"<<endl;
cout<<"Merk Baju : "<<merk<<endl;
cout<<"Harga Baju : "<<harga<<endl;
return 0;
}
semoga bermanfaat.....
kenapa dibaris ini error strcpy(merk,"H & R");
BalasHapusdan pada baris