Listing
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
char* Kal[2];
int i;
for (i=0;i<2;i++)
{
Kal[i]=new char[100];
cout<<"Masukan kata ke-"<<i+1<<":";
cin>>Kal[i];
};
for (i=0;i<2;i++)
{
cout<<"Kata ke-"<<i+1<<"adalah :"<<Kal[i]<<endl;
delete Kal[i];
}
getch();
}
Tidak ada komentar:
Posting Komentar