Advertisement
huutho_96

Vẽ bản đồ Việt Nam từ 1 chuỗi string

Jun 18th, 2016
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. //https://web.facebook.com/CungHocLapTrinhUIT/
  2.  
  3. #include <stdio.h>
  4. void main()
  5. {
  6.     char* str = "LA0KCAA0BABBAJ0AP0BP0BQ0DS0CR0DO0IH0JG0KE0HG0GH0IE0JD0LC0MD0NC0OC0PC0QC0QEKABA0SDMA0TD0TE0VD0UE0UF0UF0TH0UG0UG0UG0UH0UH0TH0RJ0OM0OL0OJ0LL0JL0GABI0GACGQAAA0KGQA0KEPAAAAAAA0KCEAMA0KBUA0";
  7.     int i = 0, j = 1, c;
  8.     while (str[i] != 0){
  9.         c = str[i++];
  10.         if (c > 64){
  11.             while (c-- > 64) putchar(33 ^ (j & 0x01));
  12.             j++;
  13.         }
  14.         else{
  15.             putchar(c - 38);
  16.             j = 1;
  17.         }
  18.     }
  19.     getc(stdin);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement