Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions how to find square and cube of five number

Have Programming Question? Ask it here!
 
 
 


iftikhar rasool
how to find square and cube of five number
1 Answer(s)      3 years and 8 months ago
Posted in : JavaScript Questions


how to find square and cube of five number


Advertisement
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: <html> <script> document.writeln("Square of 5 numbers:<br><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
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
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 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... : 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
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...;Enter number:   <input id="number" type="
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
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
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
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
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
Create cube shape in Applet
Create cube shape in Applet In this tutorial, you will learn how to create a cube using java2d. The example creates a cube which gives a 3d view to the cube. Here we haven't used java3d packages. The cube can be rotate when
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, we can find the total number of rows in a table using following query
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
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
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"
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
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
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
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 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 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 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 generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
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: import java.util.*; import java.text.*; class CheckDay{ public static void main(String
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:00 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) Could you please
multidimensional data cube - Java Beginners
multidimensional data cube  how to create multidimensional data cube in java  Hi friend, A data warehouse comprises a multidimensional data storage area to store multidimensional data and a transactional data
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
How to find a servlet object by name?
How to find a servlet object by name?  How can we locate a servlet object in the code by it's object name?   A. In web.xml you map servlet and define url pattern. Now this url-pattern is used for calling servlet. <
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
How to find maximum value in ArrayList
How to find maximum value in ArrayList  **Sir i am writing below code but its not working.i don't know how to implement logic my requirement.My requirement is find maximum value in userdefined objects and dispaly that object
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
How to find a config file in spring project
How to find a config file in spring project  how to find configuration file in the spring project
how to find which user has modified the file
how to find which user has modified the file  how to find which user has modified the file
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
About OLAP Cube in OLAP DataGrid in Flex4
About OLAP Cube in OLAP DataGrid in Flex4: OLAP cube have many dimensions. Dimensions of an OLAP cube represent the field of the flat data. for example...: Month, product. The value along each dimension of the cube is called a member
Five disciplines in the Iterative Life Cycle
Five disciplines in the Iterative Life Cycle  hello, What are the Five disciplines in the Iterative Life Cycle?   hii, These are the Five Disciplines in the Iterative Life Cycle:- Requirements Analysis and Design
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: Enter string: Hi How are you
Five-in-a-row
Java: Example - Five-in-a-row Two players alternate making moves. The player who places five pieces in a row wins. The source program consists... // Five.java - main program for Five-In-A-Row Program import javax.swing.JFrame
how to find the sum of integers in a string of sentence in java
how to find the sum of integers in a string of sentence in java  how to find the sum of integers in a string of sentence in java for e.g:--> abc d 2 3 21 the output should be 2+3+21=26
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... In this you have learned how to find the port number of MySQL server running on Linux
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
 

 

 

DMCA.com