fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. // Array เก็บคำทักทายในแต่ละภาษา
  5. const char *greetings[] = {
  6. "Hello (English)",
  7. "สวัสดี (Thai)",
  8. "Hola (Spanish)",
  9. "Bonjour (French)",
  10. "Hallo (German)",
  11. "Ciao (Italian)",
  12. "Olá (Portuguese)",
  13. "Namaste (Hindi)",
  14. "Salaam (Arabic)",
  15. "Konnichiwa (Japanese)",
  16. "Annyeonghaseyo (Korean)",
  17. "Ni Hao (Chinese)",
  18. "Privet (Russian)",
  19. "Guten Tag (German)",
  20. "Merhaba (Turkish)",
  21. "Sawubona (Zulu)",
  22. "Shalom (Hebrew)",
  23. "Jambo (Swahili)",
  24. "Sveiki (Latvian)",
  25. "Salve (Latin)"
  26. };
  27.  
  28. // วนลูปแสดงคำทักทายในแต่ละภาษา
  29. printf("Greetings in 20 languages:\n\n");
  30. for (int i = 0; i < 20; i++) {
  31. printf("%d. %s\n", i + 1, greetings[i]);
  32. }
  33.  
  34. return 0;
  35. }
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
Greetings in 20 languages:

1. Hello (English)
2. สวัสดี (Thai)
3. Hola (Spanish)
4. Bonjour (French)
5. Hallo (German)
6. Ciao (Italian)
7. Olá (Portuguese)
8. Namaste (Hindi)
9. Salaam (Arabic)
10. Konnichiwa (Japanese)
11. Annyeonghaseyo (Korean)
12. Ni Hao (Chinese)
13. Privet (Russian)
14. Guten Tag (German)
15. Merhaba (Turkish)
16. Sawubona (Zulu)
17. Shalom (Hebrew)
18. Jambo (Swahili)
19. Sveiki (Latvian)
20. Salve (Latin)