Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- void inKtu(char * str) {
- int A[255];
- for (int i = 0; i < 255; i++) A[i] = 0;
- for (int i = 0; i < strlen(str); i++) {
- if (str[i] == ' ') continue;
- if (A[str[i]] == 0) { // Ky tu cung dc hieu ngam la so!
- printf("%c",str[i]);
- A[str[i]] = 1;
- }
- }
- }
- int main() {
- char * str = "Hello World!";
- inKtu(str);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement