Program to find Square and cube of a Number

/* Program to find Square and cube of a Number */

class P2
{    

     public static void main(String args[])
     {
    int i=5 ;
   
    System.out.println(" The Number is  : "+i) ;
    System.out.println("The Square of Number is  : "+(i*i));
    System.out.println("The Cube of Number is  : "+(i * i* i));
             
      }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|