Skip to content

Tugas Pointer Fajar dan Altus Arnadi

October 15, 2013

   #include <iostream.h>

  #include <conio.h>

  #include <stdio.h>

 

  void main()

  {

     char kata[100];

                  char *balik;

                  int i,jumlah;

 

                  jumlah=0;

                  balik=kata;

                  char x;

                                do

      {

                                                cout<<“\t ===—————**————–=== \n\n”;

         cout <<“\t Masukkan kata : “;

                                                gets(kata);

                                                                                 for(i=0;kata[i]!=”;i++)

{jumlah ++;}

                                                cout<<“\n\t ===—————**————–=== \n\n”;

                                                cout << “\t Setelah Pembalikan Kata :”;

                                                                                 for(i=jumlah-1;i>=0;i–)

  {cout << *(balik + i);}

         cout<<“\n\n\t ===—————**————–=== \n\n”;

                                                cout<<“\n\t Tekan y untuk mengulang = “;

                                                cin>>x;

                                 } while ((x==’y’) || (x==’Y’));

                                getch();

                  }

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: