Ceriwis

Ceriwis (https://forum.ceriwis.com/forum.php)
-   Programming (https://forum.ceriwis.com/forumdisplay.php?f=63)
-   -   Masalah Manipulasi string di C ? (https://forum.ceriwis.com/showthread.php?t=538467)

Braincode 11th November 2011 01:21 PM

Masalah Manipulasi string di C ?
 

Sebemlum'y buat om momod maaf ya ts ane yg tdi klo tdak sesuai dgn rule

masklum msi nubie :ganteng:



buat agan2 master C



gini gan Ane bru dapet tugas Strukturdata



soal'y :



Masukkan himpunan A dan B yang masing-masing anggotanya adalah karakter.

Tampilkan output gabungan antara A dan B. Batasi jumlah karakter tidak lebih dari 20.



Contoh: input

Kalimat A = abcdef

Kalimat B = bdfghi





Tampilan output:



A = {a, b, c, d, e, f}

B = {b, d, f, g, h, i}



A gabung B = { a, b, c, d, e, f, g, h, i }





swaktu ane coba



#include

#include

#include



#define MAX 6



int main()

{

char A[MAX];

char B[MAX];



printf("\n Kalimat A : ");scanf("%s", A);

printf("\n Kalimat B: ");scanf("%s", B);



strcat(A,B);

puts(A);





}



ketika ane compile dan ane run



input

kalimat A = abcdef

anggota B = bdfghi

out put'y "abcdefbdfghi"



biar output'y "abcdefghi" gmana ya gan..:tanya:



skli lagi maaf ya gan kalo salah post..

maklum msi nubie...

:ceriwislove:

</div>


All times are GMT +7. The time now is 03:20 PM.