Chương trình mã hóa chuỗi bằng C

Nếu bài này hay hãy chia sẽ ngay.

Link Music :
Link Forum :
* Ca Khúc : Chương trình mã hóa chuỗi bằng C
#include <ctype.h>
#include <alloc.h>

char *crypt(char *tdiep, int column)
{
char tam[255], *result;
int i = 0, k = 0, n, j=0;

while(tdiep[i] != 0)
{
if (isalnum(tdiep[i]))
tam[k++] = tdiep[i];
i++;
}
tam[k] = 0;
result = (char *)malloc(k+1);
for (i=0; i<column; i++)
{
= 0;
while(n+< k)
{
result[j++] = tolower(tam[n+i]);
+= column;
}
}
result[k] = 0;
return result;
}

void main()
{
char thongdiep[255], *mahoa;
int col;

printf("\nnhap thong diep can ma hoa : ");
gets(thongdiep);
printf("\ncho biet so cot : ");
scanf("%d", &col);
mahoa = crypt(thongdiep, col);
printf("\nthong diep da duoc ma hoa thanh : %s", mahoa);
getch();
}

** Thể Loại :

Coppy link gửi cho bạn bè

List of songs with Thể Loại

0 nhận xét : Chương trình mã hóa chuỗi bằng C

Đăng nhận xét

[▼/▲] Emoticons

 
  • Copyright (C) 2013 Nonstop.All rights reserved. Powered by Blogger - Best view with 1024x768
  • Admin: Kay Media --- Website : KayPhim.Com
  • Liên hệ trực tuyến : kay_media | Email: kayphim@gmail.Com
  • Web thành lập ngày 20-4-2013 | Edit by Kay_Media