The following is the list of Go programming examples or Go programs that help you practice at your lab. We categorically divided this page into different sections, and each section has a different set of Go programs.

All the Go programs that we mentioned here have the program code along with the execution result. However, we haven’t explained the step-wise analysis because we already did in C programs and Python Programs. To make it simple, we have given the same names to these Go examples. I suggest you refer to C or Python programs to understand the analysis part (if needed).

## Basic Go programs

The following are the basic and advanced Golang programs on Numbers and conditional statements.

- Golang Program to Print Hello World
- Go Program to add Two Numbers
- Go Program to Find the Compound Interest
- Go Program to Count Digits in a Number
- Go Program to Count Total Notes in an Amount
- Go Program to Find the Cube of a Number
- Go Program to Calculate the Employee Salary
- Electricity Bill
- Even or Odd
- Even Numbers from 1 to N
- Factors of a Number
- Factorial of a Number
- First Digit of a Number
- Generic Root of a Number
- Largest of Two Numbers
- Largest of Three Numbers
- Leap year
- Multiplication Table
- Natural Numbers from 1 to N
- Natural Numbers in Reverse Order
- NCR Factorial of a Number
- Number divisible by 5 and 11
- Odd Numbers 1 to N
- Palindrome Number
- Perfect Number
- Prime Number
- Product of Digits in a Number
- Positive or Negative
- Power of a Number
- Profit or Loss
- Print 1 to 100
- Print 1 to 100 without using loop
- Reverse a Number
- Roots of a Quadratic Equation
- Simple Interest
- Square of a Number
- Square root of a Number
- Sum and Average of Natural Numbers
- Sum of Digits in a Number
- Sum of Even Numbers
- Sum of Even and Odd Numbers
- Sum of Odd Numbers
- Swap Two Numbers

## Go Array Program

The list of Golang programs on one dimensional Array.

- Golang Program to add Two Arrays
- Go Program to perform Arithmetic Operations on an Array
- Array Multiplication
- Calculate Array Average
- Count Duplicates in an Array
- Count Even and Odd Numbers in an Array
- Count Positive and Negative Numbers in an Array
- Largest Array Item
- Largest and Smallest Number in an Array
- Print Array Items
- Print Array Items in Even Index Position
- Print Array Items in Odd Index Position
- Print Even Numbers in an Array
- Print Negative Numbers in an Array
- Print Odd Numbers in an Array
- Print Positive Numbers in an Array
- Put Positive and Negatives in a Separate Array
- Reverse an Array
- Search for Array Items
- Smallest Array Item
- Sum of Array Items

## Go Program on Matrix

These are some of the Matrix programs in Golang.

- Golang program to add Two Matrices
- Arithmetic Operations on Matrix
- Determinant of a Matrix
- Identity Matrix
- Interchange Matrix Diagonals
- Matrix Lower Triangle
- Matrix Multiplication
- Matrix Upper Triangle
- Print Matrix Items
- Scalar Matrix Multiplication
- Sparse Matrix
- Sum of Each Matrix Column
- Sum of Each Matrix Row
- Sum of Each Row and Column of a Matrix
- Sum of Matrix Diagonal
- Sum of Matrix Lower Triangle
- Sum of Matrix Opposite Diagonal
- Sum of Matrix Upper Triangle
- Symmetric Matrix
- Transpose a Matrix
- Two Matrixes are Equal

## Go String Programs

The following are list of Golang programs to work with Strings.

- Go Program to Find the ASCII value of String Characters
- Go Program to Concat Two String
- Convert Byte to String
- Convert String to Byte Array
- First Character in a String
- Last Character in a String
- Print String Characters
- String Length

## Go Character Programs

In these Go example programs, we use both the Rune and the byte variables to represent the characters.

- Go Program to Check Whether the Character is Alphabet or Not
- ASCII Value of a Character
- ASCII Values of All Characters
- Check Character is a Lowercase
- Check Character is an Uppercase
- Convert Lowercase Character to Uppercase
- Convert Uppercase Character to Lowercase
- Digit or Not
- Print Alphabets from a to z
- Print Alphabets from A to Z
- Vowel or Consonant

### Golang Volume and Surface Area Programs

The following Go examples will find and return the volume, surface area, and lateral surface area of different shapes.

- Go Program to Find the Volume and Surface Area of a Cone
- Volume and Surface Area of a Cube
- Surface Area and Volume of a Cuboid
- Volume and Surface Area of a Cylinder
- Volume and Surface Area of a Sphere

## Go Pattern Programs

- Go Program to Print the Box Number Pattern of 1 and 0
- Exponentially Increased Star Pattern
- Floyd’s Triangle
- Hollow Box Number Pattern
- Hollow Rectangle Star Pattern
- Hollow Square Star Pattern
- Inverted Pyramid Star Pattern
- Inverted Right Triangle Number Pattern
- Inverted Right Triangle Star Pattern
- Mirrored Right Triangle Pattern
- Print 1 and 0 in Alternative Columns
- Print 1 and 0 in Alternative Rows
- Pyramid Star Pattern
- Rectangle Number Pattern
- Rectangle Star Pattern
- Reversed Mirrored Right Triangle Pattern
- Right Angled Triangle Number Pattern
- Right Angled Triangle Star Pattern
- Square Number Pattern
- Square Star Pattern