IJUL'S BLOG

Contoh Membalik Kalimat

catatan kuliahq:
ni source code membalik kalimatnya bro:

#include<iostream.h>
#include<conio.h>
#include<string.h>

void main()
{
    int i,j;
    char teks[100];
    cout<< " Masukkan kalimat yang ingin dibalik = ";
    cin.get(teks,sizeof(teks));
    j=strlen(teks);
   cout<< " Kalimat yang telah dibalik = ";
    for ( i=j-1;i>=0;i--)
    {
        cout<<teks[i];
    }
}

0 komentar:

Posting Komentar

Powered By Blogger
Diberdayakan oleh Blogger.

Entri Populer

PENGUNJUNG

Buku Tamu

About Me

Foto Saya
Ijal Ferdi
there is no something special about me,,, but this blog is so special for me......
View my complete profile

Total Tayangan Halaman

Followers