Akhil Sharma has Published 507 Articles

Golang Program to Check if An Array Contains a Given Value

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 11:11:10

29K+ Views

In this tutorial we will learn how to check if a given value is present in a Go−lang array or not. We will use 2 methods for this. Method 1: Using a for loop directly in the main function We will use a for loop to iterate over the elements ... Read More

Golang Program to make a Simple Calculator using Switch Case

Akhil Sharma

Akhil Sharma

Updated on 28-Oct-2022 07:58:28

5K+ Views

In this tutorial we will see how to make a simple calculator using switch case statements in Go programming language. The switch statement will assess an expression, comparing the expression's value against a series of case conditions given in a series and executes the statement after the first condition with ... Read More

Golang Program to get total bits required for the given number using library function

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 13:05:51

611 Views

In this article we will discuss about how to get total bits required for the given number using library function in Go language. To get the total number of bits of any number we need to represent that number in binary which is a combination of zeroes and ones and ... Read More

Golang Program to get the remainder of float numbers using library function

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 12:58:41

561 Views

In this article we will discuss about how to get the remainder of float numbers using library function in Go language. In programming, a float is a number that has a decimal point in it. For example: 0.2, 5.89, 20.79, etc. Remainder: Remainder in division is defined as the result ... Read More

Golang Program to Reverse a Sentence using Recursion

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 12:10:12

739 Views

In this tutorial, we will learn how to reverse a sentence using recursion in Go Programming Language. A Recursion is where a function calls itself by direct or indirect means. Every recursive function has a base case or base condition which is the final executable statement in recursion and halts ... Read More

Golang Program to Create a Function without Argument and Without a Return Value

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 11:41:08

2K+ Views

In this tutorial we will learn how to create a function without argument and without a return value in Go Programming Language. When a function has no arguments, it does not receive any data from the calling function. Similarly when it does not return any value, the calling function does ... Read More

Golang Program to Find G.C.D Using Recursion

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 11:34:00

1K+ Views

In this tutorial we will discuss how to write a Golang program to find the greatest common divisor GCD using recursion. The greatest common divisor (GCD) of two or more numbers is the greatest common factor number that divides them, exactly. It is also called the highest common factor (HCF). ... Read More

Advertisements