Golang Basic Programs

This section contains the basic programs of Golang (Go programming language) like printing text, reading values, programs based on the basic operators, etc.

Practice these Golang basic programs to learn the basic concepts of Golang, these programs contain the solved code, outputs, and the detailed explanation of the statements, functions used in the Golang basic programs.

List of Golang Basic Programs

  1. Golang program to print Hello World
  2. Golang program to add two integer numbers
  3. Golang program to find the average of three numbers
  4. Golang program to swap two integer numbers
  5. Golang program to read and print an integer variable
  6. Golang program to demonstrate the use of Printf() and Scanf() function
  7. Golang program to get the ASCII value of a character
  8. Golang program to print the absolute value of float number
  9. Golang program to print the absolute value for an integer number
  10. Golang program to calculate the power of a number using the Pow() function
  11. Golang program to find the largest number between two numbers using math.Max() function
  12. Golang program to find the smallest number between two numbers using math.Min() function
  13. Golang program to demonstrate the math.Ceil() function
  14. Golang program to demonstrate the math.Floor() function
  15. Golang program to find the remainder for floating-point numbers using math.Mod() function
  16. Golang program to find the IEEE 754 representation using math.Float64bits() function of given number
  17. Golang program to check given number is EVEN or ODD
  18. Golang program to check given number is positive or negative
  19. Golang program to check given year is a leap year or not
  20. Golang program to find the largest number between two numbers
  21. Golang program to find the largest number among three numbers
  22. Golang program to convert the Fahrenheit to Celsius
  23. Golang program to convert the Celsius to Fahrenheit
  24. Golang program to demonstrate the bitwise Left Shift (<<) operator
  25. Golang program to demonstrate the bitwise Right Shift (>>) operator
  26. Golang program to demonstrate the BITWISE AND (&) operator
  27. Golang program to demonstrate the BITWISE OR (|) operator
  28. Golang program to demonstrate the BITWISE XOR (^) operator
  29. Golang program to demonstrate the NOT (!) operator
  30. Golang program to calculate the area of the circle
  31. Golang program to calculate the perimeter of the circle
  32. Golang program to calculate the area of the Rectangle
  33. Golang program to demonstrate the 'const' keyword
  34. Golang program to demonstrate Sizeof() operator
  35. Golang program to demonstrate the 'defer' keyword
  36. Golang program to demonstrate the 'defer' keyword to add two numbers
  37. Golang program to print the type of specified variable using format specifier in printf() function
  38. Golang program to print the binary value of a specified number using format specifier in printf() function
  39. Golang program to print the octal value of a specified number using format specifier in Printf() function
  40. Golang program to print the hexadecimal value of a specified number using format specifier in printf() function
  41. Golang program to print the floating-point value in scientific notation
  42. Golang program to print the string in double-quotes using format specifier
  43. Golang program to print the variable address using '%p' format specifier
  44. Golang program to demonstrate the io.WriteString() function
  45. Golang program to print the Boolean value using format specifier in fmt.Printf() function
  46. Golang program to demonstrate the fmt.Scan() function
  47. Golang program to print '%' on the console screen using fmt.printf() function
  48. Golang program to demonstrate the fmt.Sprintf() function
  49. Golang program to demonstrate the fmt.Sscanf() function



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.