Ankita Saini has Published 319 Articles

Swift Program to Find Sum of Even Fibonacci Terms Till number N

Ankita Saini

Ankita Saini

Updated on 19-Aug-2022 10:02:42

819 Views

This tutorial will discuss how to write a Swift program to find sum of even fibonacci terms till number N. A series of numbers in which every number is the sum of the two preceding numbers is known as Fibonacci series. The starting number of the Fibonacci series is 0 ... Read More

Swift Program to Find LCM of two Numbers

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 13:24:57

603 Views

This tutorial will discuss how to write a Swift program to find LCM of two numbers. LCM is also known as Least Common Multiple. It is used to calculate the smallest common multiple between two or more numbers. Here common multiple represents a number which is multiple of two or ... Read More

Swift Program to Find GCD of two Numbers

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 13:20:37

782 Views

This tutorial will discuss how to write a Swift program to find GCD of two numbers. GCD is also known as Greatest Common Divisor or HCF(Highest common factor). GCD of two positive number is defined as the greater positive number which is the common factor of both the given two ... Read More

Swift Program to Round a Number to n Decimal Places

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 13:14:28

5K+ Views

This tutorial will discuss how to write a Swift program to round a number to n decimal places. Rounding a number means round a decimal number to a certain number of decimal places or we can say round to the nearest wholes, tenths, hundredths, or thousandth. It save time and ... Read More

Swift Program to Sort Elements in Lexicographical Order (Dictionary Order)

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 13:07:44

362 Views

This tutorial will discuss how to write a Swift program to sort elements in lexicographical order(Dictionary order). An arrangement of the words, characters or numbers in alphabetical order staring from A to Z is known as lexicographic order. It is also known as dictionary order because the searching of the ... Read More

Swift Program to Count the Number of Vowels and Consonants in a Sentence

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 13:01:24

1K+ Views

This tutorial will discuss how to write a Swift program to count the number of vowels and consonants in a sentence. An alphabet contains 26 letters out of which 5 are vowels and 21 are consonants. A, E, I, O, and U are known as vowels and B, C, D, ... Read More

Swift Program to Compute Quotient and Remainder

Ankita Saini

Ankita Saini

Updated on 18-Aug-2022 12:49:37

446 Views

This tutorial will discuss how to write a Swift program to compute quotient and remainder. In a division process, a number is divided by another number to get a resultant number. Or we can say that division is a process in which we divides larger number of group into small ... Read More

Swift Program to Print the ASCII values

Ankita Saini

Ankita Saini

Updated on 05-Aug-2022 08:54:08

2K+ Views

This tutorial will discuss how to write a Swift program to print the ASCII values. ASCII is known as American Standard Code for Information Interchange. In electronic communication, it is a character encoding standard to represent text in the computer and other devices. It generally has 128 standard ASCII codes ... Read More

Swift Program to Get Input from the User

Ankita Saini

Ankita Saini

Updated on 05-Aug-2022 08:50:42

8K+ Views

Getting input from the user in Swift is very easy with the help of the readLine() function. This function returns a string of characters which is read from the standard input at the end of the current line. If the control is already reached the EOF when the readLine() function ... Read More

Swift Program to Display Alphabets (A to Z) using loop

Ankita Saini

Ankita Saini

Updated on 05-Aug-2022 08:40:12

831 Views

This tutorial will discuss how to write a Swift program to display alphabets (A to Z) using loop. In Swift, we can display alphabets starting from A to Z in both lower and upper case with the help of for-loop. Here we use the following terms in the below codes ... Read More

Advertisements