Ankita Saini has Published 319 Articles

Swift Program to Find the Area of a Circle

Ankita Saini

Ankita Saini

Updated on 29-Jul-2022 10:10:06

725 Views

This tutorial will discuss how to write a swift program to find the area of a Circle.In a circle, an area is known as the space that is enclosed inside the boundaries of the circle in the two-dimensional plane. Suppose we have a round tea table now the area of ... Read More

Swap Numbers without using temporary variable in Swift Program?

Ankita Saini

Ankita Saini

Updated on 29-Jul-2022 10:07:16

13K+ Views

This tutorial will discuss how to write a swift program to swap two numbers without using temporary variable. Swapping of two variables means mutually exchanging the values of two variables.Swapping two numbers without using temporary variablesGiven two variables Number1 and Number2 now we swap their values without using any temporary ... Read More

How to Add two Numbers in Swift Program?

Ankita Saini

Ankita Saini

Updated on 29-Jul-2022 09:53:04

3K+ Views

This tutorial will discuss how to write a swift program to add two numbers.Adding two numbers in Swift language is simple and can be performed with the help of the addition arithmetic operator(+). The arithmetic addition operator (+) uses two numbers as operands and returns their sum as output.In this ... Read More

How to Print a String in Swift Program?

Ankita Saini

Ankita Saini

Updated on 29-Jul-2022 09:50:50

545 Views

This tutorial will discuss how to write a swift program toprint a string. A string is a collection of characters such as “TutorialsPoint”, “Hello Purnima! How are you?”, etc. Strings can also be represented by Unicode. We can easily create and modifies a strings because they are lightweight and readable, ... Read More

How to Read The Number From Standard Input in Swift Program?

Ankita Saini

Ankita Saini

Updated on 28-Jul-2022 12:40:08

1K+ Views

This tutorial will discuss how to write a swift program to read the number from standard input. Reading a number from standard input in Swift is very easy with the help of readLine(), Int(), and Float() functions.readLine() function − This function returns a string of characters which is read from ... Read More

Swift Program to Find the Perimeter of a Circle

Ankita Saini

Ankita Saini

Updated on 28-Jul-2022 09:53:05

2K+ Views

This tutorial will discuss how to write a Swift program to find the perimeter of the circle.Perimeter of the circle is also known as the circumference of the circle. It is used to calculate the boundary of the circle. Suppose we want to fence our circular garden so with the ... Read More

Swift Program to Multiply Two Floating-Point Numbers

Ankita Saini

Ankita Saini

Updated on 28-Jul-2022 09:40:01

473 Views

This tutorial will discuss how to write a swift program to multiply two floating point numbers.Floating point numbers are the numbers with fraction or numbers with decimal value for example 34.56, 987.23, 0.234, etc. In Swift, floating point data type has a wide range of values and can store much ... Read More

How to Print an Integer in Swift Program?

Ankita Saini

Ankita Saini

Updated on 28-Jul-2022 09:26:11

1K+ Views

This tutorial will discuss how to write a swift program to print an Integer. Integers represents the number with no fractional component like 45, 980, -234, 24, etc. Swift supports both signed as well as unsigned integers in 8, 16, 32, and 64 bit. Here signed integer is represented by ... Read More

Swift Program to Find Area of Square

Ankita Saini

Ankita Saini

Updated on 28-Jul-2022 09:18:24

1K+ Views

This tutorial will discuss how to write a swift program to find the area of square.A Square is a two-dimensional closed figure with four equal side and four equal angle. It can also have two diagonals of equal length. The area of the square is known as the space that ... Read More

Advertisements