001_hello.zig 467 B

123456789101112131415161718192021
  1. //
  2. // Oh no! This program is supposed to print "Hello world!" but it needs
  3. // your help!
  4. //
  5. //
  6. // Zig functions are private by default but the main() function should
  7. // be public.
  8. //
  9. // A function is declared public with the "pub" statement like so:
  10. //
  11. // pub fn foo() void {
  12. // ...
  13. // }
  14. //
  15. // Try to fix the program and run `ziglings` to see if it works!
  16. //
  17. const std = @import("std");
  18. fn main() void {
  19. std.debug.print("Hello world!\n", .{});
  20. }