In mathematics, a modular equation is an algebraic equation satisfied by moduli, in the sense of moduli problem. That is, given a number of functions on a moduli space, a modular equation is an equation holding between them, or in other words an identity for moduli.The most frequent use of the term modular equation is in relation to the moduli problems for elliptic curves. In that case, the moduli space itself is of dimension one. That implies that any two rational functions F and G, in the function field of the modular curve, will satisfy a modular equation P(F, G) ... Read More
We have an n number of coins and we have to French the coin way that it makeup Pyramid of maximum height. We will arrange the first coin in First row second and third coin in the second row and so onIn the given diagram, we make pyramid 6 of coins having a height of 3. We cannot make height 4 but we will need 10 coins. It is simple to get the height by using this formula;H = {(-1+ √(1+8N))/2}Input: n = 10 Output: Height of pyramid: 4ExplanationHeight by using this formulaH = {(-1+ √(1+8N))/2}Example#include #include using ... Read More
A set of points on a plain surface that forms a curve such that any point on that curve is equidistant from a point in the center (called focus) is a parabola.The general equation for the parabola isy = ax2 + bx + cThe vertex of a parabola is the coordinate from which it takes the sharpest turn whereas a is the straight-line used to generate the curve.Focus is the point with is equidistant from all points of the parabola.Here, we will find the vertex, focus, and directrix of a parabola. There is a mathematical formula that finds all these ... Read More
The HTML DOM Fieldset form property returns the form reference of the type form object. This is for the element that is present inside that given form. It is a read-only property. If the specified fieldset isn’t present inside the form then null is returnedSyntaxFollowing is the syntax for the fieldset form property −fieldsetObject.formExampleLet us look at an example for the fieldset form property − function formId() { var field = document.getElementById("FieldSet1").form.id; document.getElementById("Sample").innerHTML = "The id of the form in which fieldset element is present is ... Read More
The HTML DOM exitFullscreen() method is used for getting an element currently in the full screen mode to get out of that mode. It does nothing if executed on an element that isn’t in the full screen mode already.SyntaxFollowing is the syntax for exitFullscreen() method −HTMLElementObject.exitFullscreen()ExampleLet us look at an example for the exitFullscreen() method − var docEle = document.documentElement; function GoNormal() { if (document.exitFullscreen) document.exitFullscreen(); } function GoFullscreen() { if (docEle.requestFullscreen) docEle.requestFullscreen(); } exitFullscreen() method example ... Read More
Operator overloading is an important concept in C++. It is a type of polymorphism in which an operator is overloaded to give user-defined meaning to it. The overloaded operator is used to perform the operation on the user-defined data type. For example, '+' operator can be overloaded to perform addition on various data types, like for Integer, String(concatenation), etc.Input10 20 20 30Output30 50ExplanationTo perform addition of two numbers using ‘-‘ operator by Operator overloading. Binary operators will require one object as an argument so they can perform the operation. If we are using Friend functions here then it will need ... Read More
Given a, b and n. And we have to consider the following conditions and find the optimal solution to add n digits to a such that it is divisible by b after every iteration.Add a digit to a in such a way that after adding it, a is divisible by b.Print the smallest value of a possible after n iterations of step1.Print fail if the operation fails.check divisibility after every digit addition.Inputa=5 b=4 n=4Output52000ExplanationThe first digit to be added from 0 to 9, if none of the digits make a divisible by b then the answer is -1 which means the if n digits are ... Read More
In this section we will see how we can read file content word by word using C++. The task is very simple. we have to use the file input stream to read file contents. The file stream will open the file by using file name, then using FileStream, load each word and store it into a variable called word. Then print each word one by one.Algorithmread_word_by_word(filename)begin file = open file using filename while file has new word, do print the word into the console done endFile Content (test_file.txt)This is a test file. There are ... Read More
The program to find the area of a square inscribed in a circle which itself is inscribed in an equilateral triangle. The radius of circle inscribed inside an equilateral is a/(2√3).The diameter of circle is the diagonal of square, d = 2 * r = a/ √3 Area formula for area of square given its diagonals is ½ d2, A = 0.5 * d2 A = (1/2) * (a2) / (3) = (a2/6) Example#include using namespace std; int main() { float area,a = 10; area = (a*a) / 6; cout
The HTML DOM console.time() method is used for displaying the time elapsed in executing a piece of code. This helps us in analyzing the entire code or specific bits of our code. By timing your code you can make it more efficient. Using the optional label parameter you can create several timers on the same page.SyntaxFollowing is the syntax for HTML DOM console.time() method −console.time(label)Here, the label is an optional parameter to give our timer a name.ExampleLet us look at an example for the console.time() method − console.time() Method Click the below button to time the for, while ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP