Bash program to check if the Number is a Prime or not

sudhir sharma
Updated on 13-Nov-2019 11:53:01

17K+ Views

Bash also known as GNU bash is a command language and unix shell script is a command line interpreter for operating system. It was designed by Brian Fox and was a free software which replaced Bourne shell. It first released in 1989 and some became go to for login shell for linux based operating systems like macOS, Linux based softwares, etc.Prime number is a number that has only two factors i.e. the number itself and 1. For example, 2 , 3 , 5, 7 , 11 , 13 , 17 , 19 , 23 , 29….Here we are given a ... Read More

bar() function in C graphics

sudhir sharma
Updated on 13-Nov-2019 11:47:23

1K+ Views

bar() function is a C graphics function that is used to draw graphics in the C programming language. The graphics.h header contains functions that work for drawing graphics. The bar() function is also defined in the header file.Syntaxvoid bar(int left, int top, int right, int bottom );The bar() function is used to draw a bar ( of bar graph) which is a 2-dimensional figure. It is filled rectangular figure. The function takes four arguments that are the coordinates of (X, Y) coordinates of the top-left corner of the bar {left and top } and (X, Y) coordinates of the bottom-right ... Read More

Bands in Radio frequency Spectrum in C program

sudhir sharma
Updated on 13-Nov-2019 11:43:05

350 Views

Radio frequency (RF) is the oscillation of an A.C. current or an A.C. voltage or any other oscillating body in the frequency range of 20KHz to 300 GHz.Radio frequency spectrum of a device is the frequency range that the device can capture, process or repercate. Generally the frequency range is 20Hz to 20KHz.A band is a frequency range that is divided from very low frequency to extremely high frequency. These bands are small ranges of frequency that are used to provide small parts of the spectrum.Bands In Radio Frequency SpectrumFrequency Range is range of continuous that has an upper limit ... Read More

C++ Balanced expressions such that given positions have opening brackets

sudhir sharma
Updated on 13-Nov-2019 11:30:34

146 Views

A balanced expression of parentheses is an expression that contains pairs of all sort of parentheses together in a correct order. this means that for every opening parentheses there is a closing parentheses in proper order of parentheses i.e. { }.Expression − {([][]{})({}[]{})}Output − balancedNow, in this problem we have to create all possiblebalanced expressions from the given number of brackets.And the condition is that the given position have opening brackets.In this problem, we are given an integer n and an array of position of the brackets of length 2n and we have to find the number of balanced expressions ... Read More

Array Representation Of Binary Heap

sudhir sharma
Updated on 13-Nov-2019 10:20:04

3K+ Views

The complete binary tree that follows the properties of heap ordering is called binary heap.Based on the ordering of binary heap, it can be of two types −min Heap is the heap in which the value of node is greater than or equal to the value of its parent node. The root node of min heap is smallest.max Heap is the heap in which the value of node is smaller than or equal to the value of its parent node. The root node of max heap is greatest.The values of binary heap is typically represented as an array. The array ... Read More

UInt16.MinValue Field in C# with Examples

AmitDiwan
Updated on 13-Nov-2019 07:42:02

69 Views

The UInt16.MinValue field in C# represents the minimum possible value of the 16-bit unsigned integer.SyntaxFollowing is the syntax −public const ushort MinValue = 0;ExampleLet us now see an example to implement the UInt16.MinValue field −using System; public class Demo {    public static void Main(){       ushort val1 = 23;       ushort val2 = 0;       Console.WriteLine("Value1 = "+val1);       Console.WriteLine("Value2 = "+val2);       Console.WriteLine("HashCode for value1 = "+val1.GetHashCode());       Console.WriteLine("HashCode for value2 = "+val2.GetHashCode());       Console.WriteLine("Are they equal? = "+(val1.Equals(val2)));       TypeCode type1 ... Read More

GATE 2020: How to Prepare, What’s New and Preparation Tips

Swetha Prasanna
Updated on 13-Nov-2019 07:15:09

78 Views

Graduate Aptitude Test in Engineering, popularly called GATE, is one of the most prestigious exams in India and most awaited by students who want to pursue post-graduation in reputed institutes of Technology and Engineering all across India. GATE 2020 is being conducted by IIT Delhi and the institute shared that they received around 8.58 lakh applications for the exam.What’s new in GATE 2020?As per the changes to GATE 2020, the following points are worth notable −All those candidates who registered after May 31, 2013, for certification equivalent to B.E./B.Tech/B. Arch from any of the professional societies (IE, ICE, IETE, AeSI, ... Read More

Uri.IsBaseOf(Uri) Method in C#

AmitDiwan
Updated on 13-Nov-2019 07:08:36

93 Views

The Uri.IsBaseOf() method in C# is used to determine whether the current Uri instance is a base of the specified Uri instance.SyntaxFollowing is the syntax −public bool IsBaseOf (Uri uri);Above, the parameter Uri is the specified Uri instance to test.ExampleLet us now see an example to implement the Uri.IsBaseOf() method −using System; public class Demo {    public static void Main(){       Uri newURI1 = new Uri("https://www.tutorialspoint.com/index.htm");       Console.WriteLine("URI = "+newURI1);       Uri newURI2 = new Uri("https://www.tutorialspoint.com/");       Console.WriteLine("URI = "+newURI2);       if(newURI1.Equals(newURI2))          Console.WriteLine("Both the URIs ... Read More

MathF.Ceiling() Method in C# with Examples

AmitDiwan
Updated on 13-Nov-2019 07:06:30

191 Views

The MathF.Ceiling() method in C# is used to find the smallest integer greater than or equal to the float value in the argument.SyntaxFollowing is the syntax −public static float Ceiling (float val);Above, Val is the floating-point value.ExampleLet us now see an example to implement the MathF.Ceiling() method −using System; class Demo {    public static void Main(){       float val1 = 12.67f;       float val2 = 30.13f;       Console.WriteLine("Ceiling (value1) = "+MathF.Ceiling(val1));       Console.WriteLine("Ceiling (value2) = "+MathF.Ceiling(val2));    } }OutputThis will produce the following output −Ceiling (value1) = 13 Ceiling (value2) = ... Read More

MathF.Cbrt() Method in C# with Examples

AmitDiwan
Updated on 13-Nov-2019 07:05:14

29 Views

The MathF.Cbrt() method in C# is used to return the cube root of a floating-point value.SyntaxFollowing is the syntax −public static float Cbrt (float val);ExampleLet us now see an example to implement the MathF.Cbrt() method −using System; class Demo {    public static void Main(){       float val1 = 64f;       Console.WriteLine("Cube root = "+MathF.Cbrt(val1));    } }OutputThis will produce the following output −Cube root = 4ExampleLet us now see another example to implement the MathF.Cbrt() method −using System; class Demo {    public static void Main(){       float val1 = 12.67f;     ... Read More

Advertisements