
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

783 Views
This tutorial will discuss how to write a Swift program to find the sine of given radian value. A sine function is used to define the ratio of the length of the opposite side to the hypotenuse in the right-angled triangle. It is also known as the sin function. The mathematical representation of the sine() function is: sin() = opposite Side/ hypotenuse In Swift, we can calculate the sine of the given radian value using the pre-defined sin() function. This function return the sine value of the specified number between -1 to 1. Here, the specified number represents an ... Read More

381 Views
This tutorial will discuss how to write a Swift program to calculate the volume and area of the Sphere. A sphere is a three-dimensional round solid shape or object. Or we can say a sphere is a shape that is defined in three axes: x-axis, y-axis, and z-axis. It does not hold any vertices or edges. Volume of the Sphere The amount of space occupied by a sphere in the three-dimensional plane is known as the volume of a sphere. For example, we want to fill a spherical ball with liquid, so using volume we can calculate the required ... Read More

431 Views
This tutorial will discuss how to write a Swift program to calculate the volume and area of the cylinder. A cylinder is a three-dimensional shape that has two identical parallel circular bases joined by a curved surface.Volume of the Cylinder The amount of space occupied by the cylinder in the three-dimensional plane is known as the volume of the cylinder. For example, we want to fill a cylindrical bottle with shampoo, so using volume we can calculate the required amount of shampoo. We can calculate the volume of the cylinder using radius and height of the cylinder. Formula Following is ... Read More

520 Views
This tutorial will discuss how to write a Swift program to find the sum of first N odd numbers.A number that is not divisible by 2 or we can say that when an odd number is divided by 2 then it leaves some remainder such type of number is known as an odd number. For example, when 2 divides by 2 leave remainder 0 whereas 3 divides by 2 leaves remainder 1. So it means 2 is even number and 3 is an odd number. List of odd numbers is: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, ... Read More

712 Views
This tutorial will discuss how to write a Swift program to find the sum of all odd numbers upto N. A number that is not divisible by 2 or we can say that when an odd number is divided by 2 then it leaves some remainder such type of number is known as an odd number. For example, when 2 divides by 2 leave remainder 0 whereas 3 divides by 2 leaves remainder 1. So it means 2 is an even number and 3 is an odd number. List of odd numbers is − 1, 3, 5, 7, 9, 11, ... Read More

351 Views
This tutorial will discuss how to write a Swift program to calculate the sum of first N even numbers. A number that is multiple of 2 or we can say that a number that is completely divisible by 2(that means leaves no remainder) is known as even number. For example, 2, 4, 6, 8, 10, …etc. are even numbers. We can calculate the sum of the first N even number using the following formula. Formula Following is the formula for the sum of first N even numbers − Sum = N(N + 1) Below is a demonstration of the ... Read More

1K+ Views
This tutorial will discuss how to write a Swift program to calculate the sum of all even numbers upto N. A number that is a multiple of 2 or we can say that a number that is completely divisible by 2(that means leaves no remainder) is known as even number. For example, 2, 4, 6, 8, 10, …etc. are even numbers. We can calculate the sum of all the even numbers upto N by adding all the even numbers present in the given list. Below is a demonstration of the same − Input Suppose our given input is − Number ... Read More

445 Views
This tutorial will discuss how to write a Swift program to find the hypotenuse of a right-angled triangle with sides l and b. A triangle in which one angle is equal to 90 degrees and the sum of the other two angles is also 90 degrees then such type of triangle is known as a right-angled triangle. A right-angled triangle has three sides- base, perpendicular, and hypotenuse. We can find the relationship between these three sides using Pythagoras theorem.In a right-angled triangle, the square of the hypotenuse side(also known as the largest side of the triangle) is equal to the ... Read More

271 Views
This tutorial will discuss how to write a Swift program to calculate the area of the rhombus. A rhombus is a closed two-dimensional figure or we can say that a rhombus is a quadrilateral whose all the sides are equal and the diagonals intersect each other at a right angle(that is 90 degrees). The area of the rhombus is known as the total space enclosed inside the boundaries of the rhombus. We can calculate the area of the rhombus using any of the following methods − Area of rhombus using diagonal Area of rhombus using base and height ... Read More

482 Views
This tutorial will discuss how to write a Swift program to find the volume of cube. A cube is a solid three-dimensional shape with six square faces and all the sides of the cube are of equal length(that means Length = Breadth = Width). It is also known as a regular hexahedron. It contains 12 edges and 8 vertices.The total number of cubic units contained by the cube is known as the volume of the cube. To calculate the volume of the cube we find the product of length, height, and width. As we know that length = height = ... Read More