jQuery UI Draggable

To make a DOM element draggable, the jQuery UI draggable() method is used. Thus the element can be moved by clicking on it with the mouse. It can also be dragged anywhere within the viewport. Syntax: The draggable () method can be used in either of the two forms: $(selector, context).draggable (options) Method $(selector, context).draggable … Read more

jQuery UI Features

jQuery UI provides various features for creating highly interactive web applications. Some of the important features of jQuery are: Open-source. Free to use. Facilitates a powerful theme mechanism. Stable. Maintenance-friendly. Facilitates extensive browser support. Helpful documentation. jQuery UI Categorization: The jQueryUI can be categorized into four groups. Interactions Widgets Effects Utilities Interactions: To interact with … Read more

Fibonacci Triangle in C Sharp

Fibonacci Triangle In C#, we can take input from the user for the limit for a Fibonacci triangle. The Fibonacci series can then be printed for that range or limit. Example: using System; public class Example { public static void Main(string[] args) { int x=1, y=2, i, z, num, j; Console.Write("Enter the range: "); num … Read more

Categories C#

Number Triangle in C Sharp

Number Triangle There are several ways to print a number triangle in C#. Example: using System; public class Example { public static void Main(string[] args) { int x, y, z, w, num; Console.Write("Enter the Range: "); num = int.Parse(Console.ReadLine()); for(x=1; x<=num; x++) { for(y=1; y<=num-x; y++) { Console.Write(" "); } for(z=1; z<=x; z++) { Console.Write(z); … Read more

Categories C#

Alphabet Triangle in C Sharp

Alphabet Triangle In C#, we can print two types of triangles, either generated by letters or numbers. Example: using System; public class Example { public static void Main(string[] args) { char ch = ‘a’; int x, y, z, w; for(x=1; x<=5; x++) { for(y=5; y>=x; y–) Console.Write(" "); for(z=1; z<=x; z++) Console.Write(ch++); ch–; for(w=1; w<x; … Read more

Categories C#

Number in Characters in C Sharp

Number in Characters To convert a number in characters in C#, we can use a loop and switch case. After taking input from the user, the number is iterated and is divided by 10 until it becomes 0. The remainder so obtained is passed in switch case to retrieve the word for the number. Example: … Read more

Categories C#

Decimal to Binary in C Sharp

Decimal to Binary A decimal or a base-10 number can be converted into binary or base-2 number in C#. Decimal Number: A decimal number ranges from 0 to 9. It can be any combination of the 10 digits between 0 to 9. Thus it is a base 10 number. Binary Number: A binary number is … Read more

Categories C#

Swap Numbers in C Sharp

Swap Numbers In C#, we can swap two numbers without using a third variable, using either of the two ways: By using the + and – operators By using the * and / operators Example 1: Using ∗ and / operators. using System; public class Example { public static void Main(string[] args) { int x=20, … Read more

Categories C#

Reverse number in C Sharp

Reverse number Loop and arithmetic operators can be used in C#, to reverse a number. Example: using System; public class Example { public static void Main(string[] args) { int num, rev=0, rem; Console.Write("Enter a Number: "); num = int.Parse(Console.ReadLine()); while(num!=0) { rem = num%10; rev = rev*10 + rem; num/=10; } Console.Write("Reverse of the Number: … Read more

Categories C#

Sum of digits in C Sharp

Sum of digits We are using a loop and mathematical operations to print the sum of digits in C#. Algorithm: Step 1: Take input from the user. Step 2: The modulus/remainder of the number is then calculated. Step 3: The remainder of the number is then summed. Step 4: The number is then divided by … Read more

Categories C#