Print Numbers Columns Wise in C

suresh kumar
Updated on 09-Jan-2020 06:35:52

2K+ Views

Program DescriptionPrint the natural numbers columns wise as show below1 2 6 3 7 10 4 8 11 13 5 9 12 14 15Algorithmi stands for rows and j stands for columns. 5 stands for making pattern for 5 Rows and Columns Loop for each Row (i) K is initialized to i Loop for each Column (j) Do the Pattern for the current Column (j) Display the Value of K Reinitialize the Value of K = k + 5 - jExample/* Program to print the Natural Numbers in Columns wise */ #include int main(){    int i,j,k;    printf("Printing the Numbers in Columns wise: ");    printf("");    printf("");    for(i=1;i

Call JavaScript Function from Chrome Console

Sreemaha
Updated on 09-Jan-2020 06:30:27

2K+ Views

To call a JavaScript function from the console, run the following code:Example                    var display = {             displayOne: function(){ return "displayTwo" ;}          };          console.log(display.displayOne());          

Use typeof with Arguments in JavaScript

Sravani S
Updated on 09-Jan-2020 06:28:04

871 Views

Arguments object is the arguments passed to a function. It is a variable accessible for all functions. Let’s say two arguments are passed to a function, then you can access them like the following:arguments[0] arguments[1]In the same way, you can use a type of with arguments in JavaScript. Firstly, let’s see how to work with the type of. The type of operator is a unary operator that is placed before its single operand, which can be of any type. ExampleThe following code shows how to implement type of operatorLive Demo                    var ... Read More

Print Multiplication Table of a Given Number in C

suresh kumar
Updated on 09-Jan-2020 06:26:23

620 Views

Program DescriptionPrint multiplication table of a given numberAlgorithmAccept any number from the User for which we need to form multiplication table.Multiply the given number starting with the value of I (=1)Multiply the given number by incrementing the value of I till the I value is lesser than or equal to 12.Example/* Program to print the multiplication table of a given number */ #include int main() {    int number, i;    clrscr();    printf("Please enter any number to find multiplication table:");    scanf("%d", &number);    printf("Multiplication table for the given number %d: ", number);    printf("");    for(i=1;i

Print Mirrored Hollow Parallelogram in C

suresh kumar
Updated on 09-Jan-2020 06:24:59

712 Views

Program DescriptionIt is a quadrilateral where both pairs of opposite sides are parallel.There are six important properties of parallelograms to knowOpposite sides are congruent (AB = DC).Opposite angels are congruent (D = B).Consecutive angles are supplementary (A + D = 180°).If one angle is right, then all angles are right.The diagonals of a parallelogram bisect each other.Each diagonal of a parallelogram separates it into two congruentAlgorithmAccept number of rows and columns from user. Store it in rows and cols variables.To iterate though rows, run an outer loop with the loop structure should look like for(r=1; r

Print Mirror Image of Sine Wave Pattern in C

suresh kumar
Updated on 09-Jan-2020 06:18:30

414 Views

Program DescriptionA sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation. A sine wave is a continuous wave. It is named after the function sine, of which it is the graph. It occurs often in pure and applied mathematics, as well as physics,  engineering,  signal processing and many other fields.Print the Mirror Image of Sine-Wave Pattern based on the Wave Height and Wave LengthAlgorithmAccept the Wave Height and Wave LengthPrint the Wave Sign for the Wave Height and the Wave Length.Example/* Program to print the mirror image of Sine Wave*/ #include int main(){    int wave_height;    int wave_length;    int i, j, k;    clrscr(); /*Clears the ... Read More

Print Squared Matrix in Z Form in C

suresh kumar
Updated on 09-Jan-2020 06:15:07

706 Views

Program DescriptionPrint the elements of the squared matrix in Z formA square matrix is a matrix with the same number of rows and columns. An n-by-n matrix is known as a square matrix of order AlgorithmTo print the elements of the Square Matrix in Z form We need to print the first row of matrix then diagonal and then last row of the square matrix.Example/* Program to print a square matrix in Z form */ #include int main(){    int rows, cols, r, c, matrix[10][10];    clrscr(); /*Clears the Screen*/    printf("Please enter the number of rows for the Square matrix: ... Read More

Text Decoration Using CSS

AmitDiwan
Updated on 08-Jan-2020 13:17:48

95 Views

The CSS text-decoration property is used to apply decoration to selected element’s text. We can add a line-through, overline, underline, etc. as values. It is a shorthand for text-decoration-line, text-decoration-color and text-decoration-style.SyntaxThe syntax of text-decoration property is as follows −Selector {    text-decoration: /*value*/ }ExampleThe following examples illustrate CSS text-decoration property − Live Demo p:nth-child(2)::before {    content: " We will reach the destination ";    background-color: lightgreen;    text-decoration: overline blue;    font-size: 1.2em; } I'm not the only traveller before night. OutputThis gives the following output −Example Live Demo ... Read More

Set Text Alignment Working with CSS

AmitDiwan
Updated on 08-Jan-2020 13:09:49

697 Views

Using CSS text-align property we can horizontally set the text of an element. We can set it to left, right, justify or center.SyntaxThe syntax of CSS text-align property is as follows −Selector {    text-align: /*value*/ }ExampleThe following exmples illustrate CSS text-align property − Live Demo div {    margin: auto;    padding: 8px;    max-width: 200px;    border: thin solid; } p {    text-align: right; } div:nth-child(3) {    text-align: center; } div:last-child {    text-align: justify; } Student Examination Details Student John Student Tom Did not appeared for the exams. ... Read More

Styling Links with CSS

AmitDiwan
Updated on 08-Jan-2020 12:59:14

229 Views

CSS allows us to style links as desired. We can format text, by adding colors, background, increase size, etc. Furthermore, animations can be added to create a pleasant visual effect.For proper functionality, the order of pseudo selectors is given by:- :link, :visited, :hover, :active.ExampleThe following examples illustrate styling of links with CSS − Live Demo p {    margin: 25px; } #mod {    padding: 10px;    color: darkturquoise;    border: thin solid;    background-color: lemonchiffon; } #mod:hover {    color: white;    box-shadow: 0 0 0 1px black;    background-color: slateblue; } Demo ... Read More

Advertisements