Akhil Sharma has Published 671 Articles

Golang Program to check the given number is an odd number using library function

Akhil Sharma

Akhil Sharma

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

462 Views

In this article we will discuss about how to check if a given number is odd using library function Go language. ODD NUMBERS − In mathematics any number is called odd if it gives “1” as remainder when divided by “2”. For example 1, 3, 5, 7 …. Even Numbers − ... Read More

Golang Program to Check if An Array Contains a Given Value

Akhil Sharma

Akhil Sharma

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

19K+ 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

4K+ 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

259 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

365 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 get the Quotient and remainder using library function

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 12:48:33

435 Views

In this article we will discuss about how to get the quotient and remainder in GO language using library function. Syntax func Div(a, b, c uint) (q, r uint) func Remainder(q, r float64) float64 The div() function accepts three arguments as unsigned integers and returns the quotient and remainder ... Read More

Golang Program to Find the Sum of N Numbers using Recursion

Akhil Sharma

Akhil Sharma

Updated on 25-Oct-2022 12:31:17

1K+ Views

In this tutorial, we are going to learn how to find the sum of N Numbers using Recursion in Golang 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 ... Read More

Golang Program to Find the Sum of Natural Numbers using Recursion

Akhil Sharma

Akhil Sharma

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

240 Views

In this tutorial, we are going to learn how to find the sum of Natural Numbers using Recursion in Golang. 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 ... Read More

Golang Program to Reverse a Sentence using Recursion

Akhil Sharma

Akhil Sharma

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

451 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

1K+ 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

Advertisements