EnglishFrenchGermanSpainItalianDutchPortugueseRussianKoreanJapaneseArabicChinese Simplified

Array 1 Dimensi

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    char* Kal[4];
    int i;
    for (i = 0; i < 4; i++){
        Kal[i] = new char[256];
        cout <<"Masukkan kata ke-" << i+1 << ": ";
        cin >> Kal[i];
        };
        for (i = 0; i < 4; i++){
            cout <<"Kata ke-" << i+1 << " adalah " << Kal[i] << endl;
            delete Kal[i];
            };
          
    system("PAUSE");
    return EXIT_SUCCESS;
}


 

No comments:

Post a Comment