how to find square and cube of five number

how to find square and cube of five number

how to find square and cube of five number

View Answers

December 14, 2010 at 2:42 PM

Hi Friend,

Try the following code:

<html>
<script>
document.writeln("Square of 5 numbers:<br><br>");
var i;
for(i=1;i<=5;i++){
document.writeln(i+"      "+(i*i)+"<br>");
}
document.writeln("Cube of 5 numbers:<br><br>");
var j;
for(j=1;j<=5;j++){
document.writeln(j+"      "+(j*j*j)+"<br>");
}
</script>
</html>

Thanks









Related Tutorials/Questions & Answers:
how to find square and cube of five number
how to find square and cube of five number  how to find square and cube of five number   Hi Friend, Try the following code:ADS_TO_REPLACE_1 <html> <script> document.writeln("Square of 5 numbers:<br>
Java Square Root And Cube Root Example
how to find the square root and cube root of a number. This example explains you about finding the square root and cube root of a number. This tutorial explains about all the steps of how to find the square root and cube root
Advertisements
Program to Find Cube Root of any Number without using built in function
Program to Find Cube Root of any Number without using built in function  Please help me in finding cube root of any number without using Built in function in java
print square of any number
print square of any number  using c++ language, write aprogram to print the square of any number entered by the user
how to find largest number? - Java Interview Questions
how to find largest number?  this is my java coding: import...); } } i don't know how to add code to find the largest number.. please help...; yup yup.. i want to know how to find the greatest number that enter
Java : Square root of any number
how to find a square root of any number without using math.sqrt() method.ADS... : It is number when we square it, find the specified number. There is simplest way to find out the square root of any number by calling math.sqrt() method. You
How do I find out the number of parameters passed into function9. ?
How do I find out the number of parameters passed into function9. ?  How do I find out the number of parameters passed into function9
How can we find the number of rows in a result set using PHP?
How can we find the number of rows in a result set using PHP?   How can we find the number of rows in a result set using PHP
Find out the prime number
Find out the prime number      ... to find out whether a given number is prime or not. Here we have used the 'for loop' statement and given the required condition for a prime number. As we know
Calculating square root using JSP & jQuery
Calculating square root using JSP & jQuery In this tutorial, we will find square root of any number with the help of JSP & jQuery. In this example... tutorail I am going to explains you to calculate the square root using jQuery. Sever
Find prime factors of non prime number
Find prime factors of non prime number In this section, you will learn how to find the prime factors of the non prime number. Here we have prompted the user... displayed a simple message and if the number is not a prime number we have find all
Find Second Largest Number from an Array
Find Second Largest Number from an Array This section illustrates you how to find the second largest number from an array. For this purpose, we have allowed... among them. Pulls the largest number out from the array and again check
how to find [count the number of integers whose value is less than the average value of the integers]
how to find [count the number of integers whose value is less than the average value of the integers]  Construct an algorithm that will prompt... amount to the screen integers from an operator at a terminal, and count the number
Write a query to find the total number of rows in a table
Write a query to find the total number of rows in a table  Write a query to find the total number of rows in a table?   Hi, Here is the answer,ADS_TO_REPLACE_1 we can find the total number of rows in a table using
find factorial of any number using recursion
find factorial of any number using recursion  error in 14 line ; expected int rec( int a) ^ how to resolve this.please correct the code. import...)); System.out.println(?enter number?); int x=Integer.parseInt(br.readLine()); int result
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE  i have some... it is: write a program that reads 10 numbers from the keyboard. find the largest number and count the occurrence of the largest number number entered from the keyboard
to read number from user
to read number from user  1)print the positive equivalent of the number 2) check if the no is integer or not 3) find the square root of the number 4) find the cube of the number
A program to find the sum of odd number
A program to find the sum of odd number In this section you will learn how to find the sum of odd number in the series up to the given number in java... the console. Now here is the simple example which will help you to find the sum of odd
find the largest number enter by user - Java Interview Questions
find the largest number enter by user  sorry for not stating clearly my question. i want to know how to find the largest number enter by user...(fwriter); for(int i=1; i<=5; i++) { System.out.print("Enter a number
Write a program to find a factorial in any given number
Write a program to find a factorial in any given number This programming tutorial will teach you how to write a factorial of any given number...; System.out.println("Enter the number to find the factorial"
Cube Root
Cube Root  Hi, Can one one please tell me how to find the cube root of any number without using any inbuilt function?? Regards: Akash
How to Check Automorphic Number using Java Program
How to Check Automorphic Number using Java Program Automorphic numbers are the numbers whose square ends with the number itself or you can say it is a number whose square ends with the given integer. For example,5 is an automorphic number
how to create triangles around square
how to create triangles around square   7 6 8 5 9 4 5 6 7 8 9 10
how to create triangles around square
how to create triangles around square   7 6 8 5 9 4 5 6 7 8 9 10
How to format number in Java?
How to format number in Java?  Hi, What is the best way to format a number in Java? How to format number in Java? Thanks   Hi, To format number in Java you can use the class java.text.NumberFormat. Here is simple
ModuleNotFoundError: No module named 'five'
ModuleNotFoundError: No module named 'five'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'five' How to remove the ModuleNotFoundError: No module named 'five' error
ModuleNotFoundError: No module named 'five'
ModuleNotFoundError: No module named 'five'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'five' How to remove the ModuleNotFoundError: No module named 'five' error
how to generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
The Garden of Five Senses Delhi
The Garden of Five Senses in Delhi There is a relatively new garden in Delhi... of Five Senses. It is located in the Saidul Ajaib around the area of Mehrauli, a notable neighborhood in the southwestern part of Delhi. The Garden of Five
how to get number of shards in elasticsearch
how to get number of shards in elasticsearch  Hi, I have elastic search server and I want to get the details of shards for each index. how to get... shards commands which is used to find out the number of shards for an index
How to format number in Java?
Learn about the code of formatting the number in Java This tutorial explains you how to format the number in Java. There are number of situations where we need the number to be formatted in many different formats. Depending the format
Square Root
Square Root  Hi, can any one please tell me the code to findout the square root of a given number with using built in function??? Thanks a lot in advance!! Regards: Akash
Java Find Automorphic numbers
Java Find Automorphic numbers In this section, you will learn how to find... whose square ends with the number itself or you can say it is a number whose square ends with the given integer. For example,5 is an automorphic number
Find Twin Primes Number using Java
Find Twin Primes Number using Java In this section, you will learn how find... by 1 and the number itself. Here we are going to find twin primes. Twin Primes... the 'for loop' statement and set the required condition for a prime number
plz give me program to this: Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
plz give me program to this: Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1
2. Given a string and a number ‘n’, find the ‘n’th distinct repeating character.
2. Given a string and a number ?n?, find the ?n?th distinct repeating character.    Given a string and a number ?n?, find the ?n?th distinct repeating character. For example, Input: Abracadabra, 1 Abracadabra, 2 Abracadabra, 3
how to auto generate number in jsp with the database connection mysql for employee number?
how to auto generate number in jsp with the database connection mysql for employee number?  how to auto generate number in jsp with the database connection mysql for employee number?   <%@page import="java.sql.
how to auto generate number in jsp with the database connection mysql for employee number?
how to auto generate number in jsp with the database connection mysql for employee number?  how to auto generate number in jsp with the database connection mysql for employee number?   <%@page import="java.sql.
MySQL default port number in Linux
MySQL default port number in Linux - How to find the default port number... is for you. In this tutorial you learn "How to find the default port number of MySQL in Linux?". After find the port number you can connect
Find number of words begin with the specified character
Count number of words begin with the specified character In this section, you will learn how to count the number of words that begin with the specified... + "-" + count); } } Output:ADS_TO_REPLACE_1 Enter string: Hi How
Using JSTL For Finding Square
are going to find out the square of values from 1 to 10. But the approach we...:forEach> core action tag of jstl which will help us to find the square of the values. We are going to find out the square from 1 to 10 which we will give
how to validate national ID number
how to validate national ID number  hey guys, plz send me a code how to vlaidate national ID number using jtextfield. in ID num thers 9 numbers +V.the V letter is included at the end of the numbers. ex:123456789V i don knw how
how to find jdk path in ubuntu?
how to find jdk path in ubuntu?  How to find out the path of installed jdk in ubuntu? Could anyone tell that command to execute from terminal.. Thanks
How to find hashtable size in Java?
How to find hashtable size in Java?  Hi, What is the code for Hashtable in Java? How to find hashtable size in Java? Give me the easy code. Thanks
Find consecutive numbers whose sum is equal to input number.
Find consecutive numbers whose sum is equal to input number. In this section, you will learn how to display the consecutive natural numbers whose sum is equal to the input number. For this purpose, the user is allowed to input a positive
How to Find PHP version and configuration?
How to Find PHP version and configuration?  Find PHP version and configuration   If you want to find the version of PHP, you can just run...: http://www.phpzag.com/find-php-version-and-configuration
how to find the given date is sunday
how to find the given date is sunday  how to find the given date is sunday in java?   Hi Friend, Try the following code:ADS_TO_REPLACE_1 import java.util.*; import java.text.*; class CheckDay{ public static void
How to find run time in SQL.
How to find run time in SQL.  I have 10 backend jobs in sql which... 22/10/2010 17:30:00ADS_TO_REPLACE_1 I want to find the run time of both the jobs. (i.e when i run the query it should show me how long job has been running
How to round a number to n decimal places in Java
How to round a number to n decimal places in Java  How to round a number to n decimal places in Java
how to create month wise serial number in java?
how to create month wise serial number in java?  Ex: For 1)January-serial number is 1/001,1/002,1/003 etc

Ads