Akhil Sharma has Published 507 Articles

Golang Program to Print Left Triangle Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 15-Nov-2022 12:01:12

553 Views

In this tutorial we will write a Go-lang code to print a Left Triangle star pattern. We will depict how you can print the star pattern in go language. * * * * * * * * * * How to print a ... Read More

Golang Program to Print Half Diamond Star Pattern

Akhil Sharma

Akhil Sharma

Updated on 15-Nov-2022 11:32:13

419 Views

In this tutorial, we will learn how to print half diamond star pattern using Go programming language. Syntax for initialization; condition; update { statement(s) } To use a for loop in go lang we first need to initialize a variable then specify the condition of the ... Read More

Golang Program to get the real part from a Complex number

Akhil Sharma

Akhil Sharma

Updated on 15-Nov-2022 11:28:26

741 Views

In this article we will discuss about how to get real part from a complex number in Go language. A complex number in mathematics is a number that can be expressed in the form of a + ib where i is called iota. The value of iota is $\mathrm{\sqrt{-1}}$ and ... Read More

Golang Program to get the magnitude of the given number

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 12:51:31

844 Views

In this article we will discuss about how to get the magnitude of a number in Go language. Magnitude of a quantity is defined as its numeric value. Magnitude of a number is always positive. In this article we will discuss about different methods by which we can obtain the ... Read More

Golang Program to Display Prime Numbers Between Two Intervals using library functions.

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 12:44:35

453 Views

In this article we will discuss about how to display prime numbers between two intervals using functions in Go language. Syntax func Sieve(n int) []int func IsPrime(n int) bool If else conditionals in GO language: If condition { // code to be executed } else ... Read More

Golang Program to create Complex numbers from given imaginary parts using In-build Library Function

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 12:18:07

829 Views

In this tutorial we will learn how to create Complex numbers from given imaginary parts in Go programming language. A complex number is a basic data type of GoLang and is a combination of the real and imaginary part, where both parts of the complex number will be float type ... Read More

Golang Program to convert string type variables into Boolean

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 12:04:37

6K+ Views

In this tutorial, we will learn how to f convert string type variables into Boolean in Go programming language. Boolean Vs String Boolean is a data type having 1-byte size. It can store any one of the three values mainly True, False or none. It acts like a flag to ... Read More

Golang Program to convert Decimal to Octal

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 11:53:21

886 Views

In this article you will know how to convert the decimal number to octal in Go language. For this we are going to use the FormatInt() function of strconv package. When we say convert the decimal number to octal, it means to convert the number with the base value 10 ... Read More

Golang Program to convert Decimal to Hexadecimal

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 11:46:41

3K+ Views

In this article you will learn the go language code to convert decimal number to Hexadecimal. Decimal Number Vs Hexadecimal Numbers Decimal numbers are the numbers which have base 10, which means each digit of a number can have an integer value ranging from 0 to 9 (10 possibilities) depending ... Read More

Golang Program to convert Boolean to String

Akhil Sharma

Akhil Sharma

Updated on 14-Nov-2022 11:36:09

4K+ Views

In this tutorial, we will learn how to convert Boolean to a string in Go programming language. Boolean Vs String Boolean is a data type having 1 byte size. It can store any one of the three values mainly True, False or none. It act like a flag to show ... Read More

Advertisements