Advertisement
dsiver144

Untitled

Dec 12th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. void inKtu(char * str) {
  5. int A[255];
  6. for (int i = 0; i < 255; i++) A[i] = 0;
  7. for (int i = 0; i < strlen(str); i++) {
  8. if (str[i] == ' ') continue;
  9. if (A[str[i]] == 0) { // Ky tu cung dc hieu ngam la so!
  10. printf("%c",str[i]);
  11. A[str[i]] = 1;
  12. }
  13. }
  14. }
  15.  
  16. int main() {
  17. char * str = "Hello World!";
  18. inKtu(str);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement