Found 26504 Articles for Server Side Programming

Swift Program to Print Alphabetic Solid Square Pattern

Ankita Saini
Updated on 30-Nov-2022 06:21:10

229 Views

This tutorial will discuss how to write swift program to print alphabetic solid square pattern. Alphabetic pattern is a sequence of alphabets starting from A to Z which is used to develop different patterns or shapes like pyramid, rectangle, cross, etc of alphabets. To create a alphabetic solid square pattern we can use any of the following methods − Using nested for loop Using init() Function Using stride Function Below is a demonstration of the same − Input Suppose our given input is − Length = A to D Output The desired output would be − A ... Read More

Swift Program to Print Alphabetic Right Triangle Pattern

Ankita Saini
Updated on 30-Nov-2022 06:19:15

575 Views

This tutorial will discuss how to write swift program to print alphabetic right triangle pattern. Alphabetic pattern is a sequence of alphabets starting from A to Z which is used to develop different patterns or shapes like pyramid, rectangle, cross, etc of alphabets. To create a alphabetic right triangle pattern we can use any of the following methods − Using nested for loop Using init() Function Using stride Function Below is a demonstration of the same − Input Suppose our given input is − Length = A to D Output The desired output would be − A ... Read More

Swift Program to convert Binary to Decimal

Ankita Saini
Updated on 30-Nov-2022 06:16:01

1K+ Views

This tutorial will discuss how to write Swift program to convert Binary to Decimal number. Decimal numbers are those numbers whose base value is 10. Decimal numbers are also known as base-10 number system which contain 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Here, the position of every digit in the decimal number has weight is a power of 10. For example, (89)10 = 8 x 101 + 9 x 100. Binary numbers are those numbers whose base value is 2. Binary numbers are also known as base-16 number system which contain only two number ... Read More

Swift Program to convert Decimal to Binary

Ankita Saini
Updated on 30-Nov-2022 06:14:20

2K+ Views

This tutorial will discuss how to write Swift program to convert Decimal to Binary number. Decimal numbers are those numbers whose base value is 10. Decimal numbers are also known as base-10 number system which contain 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Here, the position of every digit in the decimal number has weight is a power of 10. For example, (89)10 = 8 x 101 + 9 x 100. Binary numbers are those numbers whose base value is 2. Binary numbers are also known as base-16 number system which contain only two number ... Read More

Swift Program to convert Decimal to Hexadecimal

Ankita Saini
Updated on 30-Nov-2022 06:12:58

2K+ Views

This tutorial will discuss how to write Swift program to convert Decimal to Hexadecimal number. Decimal numbers are those numbers whose base value is 10. Decimal numbers are also known as base-10 number system which contain 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Here, the position of every digit in the decimal number has weight is a power of 10. For example, (89)10 = 8 x 101 + 9 x 100. Hexadecimal numbers are those numbers whose base value is 16. Hexadecimal numbers are also known as base-16 number system which contain 16 symbols: 0, ... Read More

Swift Program to convert Hexadecimal to Decimal

Ankita Saini
Updated on 30-Nov-2022 06:10:56

1K+ Views

This tutorial will discuss how to write Swift program to convert Hexadecimal to Decimal. Decimal numbers are those numbers whose base value is 10. Decimal numbers are also known as base-10 number system which contain 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Here, the position of every digit in the decimal number has weight is a power of 10. Hexadecimal numbers are those numbers whose base value is 16. Hexadecimal numbers are also known as base-16 number system which contain 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, ... Read More

Swift Program to convert Decimal to Octal

Ankita Saini
Updated on 30-Nov-2022 06:07:46

449 Views

This tutorial will discuss how to write Swift program to convert Decimal to Octal. Decimal numbers are those numbers whose base value is 10. Decimal numbers are also known as base 10 number system which contain 10 numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Here, the position of every digit in the decimal number has weight is a power of 10. Octal numbers are those numbers whose base value is 8. Octal numbers are also known as base 8 number system which contain 8 numbers: 0, 1, 2, 3, 4, 5, 6, 7. Here, the position ... Read More

How to Sort Elements in Lexicographical Order (Dictionary Order) in Golang?

Aman Sharma
Updated on 29-Nov-2022 07:52:53

2K+ Views

In this tutorial, we will write the Golang program to sort the elements in lexicographical order. The tutorial will include three different ways to do this thing. To do the sorting we need to compare two strings and for that, we will use the < operator it will return a boolean value. If the value on the left side is greater than the right side value lexicographically then it will return false else true. For example, Tutorial < Point - The operator will return true. C++ < Golang - The operator will return false. Algorithm Step 1 − Create and ... Read More

How To Perform nCr (r-combinations) in Golang?

Aman Sharma
Updated on 29-Nov-2022 07:50:29

594 Views

In this tutorial, we will perform nCr(r-combinations) in the Golang programming language. The use case of nCr(r-combinations) is to find the total number of possible arrangements where the order does not matter. In other words, we are selecting the r items from n items where the order does not matter. This tutorial will include two ways to find this in the Golang programming language. Explanation For example, for n =5 and r = 3 nCr = n! / ( r! * ( n - r )! ) = 5! / ( 3! * 2! ) = 120 / ... Read More

How to find the Surface area and Volume of Cuboid in Golang?

Aman Sharma
Updated on 29-Nov-2022 07:48:39

193 Views

In this tutorial, we will see the Golang program to find the Surface Area and Volume of a Cuboid. The area is the total space covered by any closed figure. The volume is the capacity to hold something inside the vessel. Formula l - length of a Cuboid h - the height of a Cuboid w - width of a Cuboid. Surface Area of Cuboid - 2*l*w + 2*w*h + 2*l*h For example, the length of a Cuboid is 10 cm, the height is 5 cm and, the width is 8 cm so the Surface Area of a ... Read More

Advertisements