Code

HTML code for creating form Name Email ID Mobile number enquiry message

Step 1) Add HTML <div class=”container”>  <form action=”action_page.php”>     <label for=”fname”>First Name</label>    <input type=”text” id=”fname” name=”firstname” placeholder=”Your name..”>     <label for=”lname”>Last Name</label>    <input type=”text” id=”lname” name=”lastname” placeholder=”Your last name..”>     <label for=”country”>Country</label>    <select id=”country” name=”country”>      <option value=”australia”>Australia</option>      <option value=”canada”>Canada</option>      <option value=”usa”>USA</option>    </select>     <label for=”subject”>Subject</label>    <textarea id=”subject” name=”subject” placeholder=”Write something..” style=”height:200px”></textarea>     <input type=”submit” value=”Submit”>   </form></div> Step 2) Add CSS: /* Style inputs with type=”text”, select elements and textareas */input[type=text], select, textarea {  width: 100%; /* Full width */  padding: 12px; /* Some padding */   border: 1px solid #ccc; /* Gray border */  border-radius: 4px; /* Rounded borders */  box-sizing: border-box; /* Make sure that padding and…

Code

How To Create a Responsive Pricing Table

Step 1 Add HTML: <div class=”columns”>  <ul class=”price”>    <li class=”header”>Basic</li>    <li class=”grey”>$ 9.99 / year</li>    <li>10GB Storage</li>    <li>10 Emails</li>    <li>10 Domains</li>    <li>1GB Bandwidth</li>    <li class=”grey”><a href=”#” class=”button”>Sign Up</a></li>  </ul></div> Step 2 Add CSS: * {  box-sizing: border-box;} /* Create three columns of equal width */.columns {  float: left;  width: 33.3%;  padding: 8px;} /* Style the list */.price {  list-style-type: none;  border: 1px solid #eee;  margin: 0;  padding: 0;  -webkit-transition: 0.3s;  transition: 0.3s;} /* Add shadows on hover */.price:hover {  box-shadow: 0 8px 12px 0 rgba(0,0,0,0.2)} /* Pricing header */.price .header { …

Code

Java Program to Multiply two Floating Point Numbers

In this program, you’ll learn to multiply two floating point numbers in Java, store the result and display it on the screen. Example: Multiply Two Floating-Point Numbers Output The product is: 3.0 In the above program, we have two floating-point numbers 1.5f and 2.0f stored in variables first and second respectively. Notice, we have used f after the numbers. This ensures the numbers are float, otherwise…

Code

Java Program to Add Two Integers

In this program, you’ll learn to store and add two integer numbers in Java. After addition, the final sum is displayed on the screen. Example: Program to Add Two Integers Output: Enter two numbers: 10 20 The sum is: 30 In this program, two integers 10 and 20 are stored in integer variables first and second respectively. Then, first and second are added using the + operator, and its…

C

C Program to Compute Quotient and Remainder

Program to Compute Quotient and Remainder Output Enter dividend: 25 Enter divisor: 4 Quotient = 6 Remainder = 1 In this program, the user is asked to enter two integers (dividend and divisor). They are stored in variables dividend and divisor respectively. Then the quotient is evaluated using / (the division operator), and stored in quotient. Similarly, the remainder is evaluated using % (the…

Code

Python Program to Swap Two Variables

In this example, you will learn to swap two variables by using a temporary variable and, without using temporary variable. Source Code: Using a temporary variable Output The value of x after swapping: 10 The value of y after swapping: 5 In this program, we use the temp variable to hold the value of x temporarily. We then put…

Code

Python Program to Calculate the Area of a Triangle

In this program, you’ll learn to calculate the area of a triangle and display it. If a, b and c are three sides of a triangle. Then, s = (a+b+c)/2 area = √(s(s-a)*(s-b)*(s-c)) Source Code Output The area of the triangle is 14.70 In this program, area of the triangle is calculated when three sides are given using Heron’s formula. If…

Code

Python Program to Find the Square Root

In this program, you’ll learn to find the square root of a number using exponent operator and cmath module. Example: For positive numbers Output The square root of 8.000 is 2.828 In this program, we store the number in num and find the square root using the ** exponent operator. This program works for all positive real numbers. But…