Skip to content

Instantly share code, notes, and snippets.

@biscuitrainbow
Created December 12, 2017 18:55
Show Gist options
  • Save biscuitrainbow/e13349f4c3ade53e689d2f588229d53c to your computer and use it in GitHub Desktop.
Save biscuitrainbow/e13349f4c3ade53e689d2f588229d53c to your computer and use it in GitHub Desktop.
int nearest_city;
visited_cities[city_idx] = VISITED;
// ให้เมืองที่ city_idx มีค่า = VISITED(1) สมมุติว่า city_idx คือเมืองที่ี 2 ก็จะใช้เมืองที่ 2 เป็นเมืองที่ีเคยไปแล้ว
printf("%d-->", city_idx + 1); // print เมืองปัจจุบันออกหน้าจอ เชน 2-->
fprintf(fp, "%d-->", city_idx + 1); // print เมืองปัจจุบันลงไฟล์ เช่น 2-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment