SMF For Free Support Forum
Signup For Free Forum
July 05, 2008, 05:57:13 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: Cube .. number Ect  (Read 609 times)
0 Members and 1 Guest are viewing this topic.
zilchuary
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« on: January 04, 2008, 01:31:14 pm »

Code:
import java.util.Scanner;
import java.io.*;

public class Square
{
   public static float number;
   
   public static void main(String args[])
   {
      Scanner scan = new Scanner(System.in);
      BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
      System.out.print("Number = ");   
      number = Float.parseFloat(scan.nextLine());
      for(int i = 0; i <= 10; i++)
      {
         System.out.println(number + "^2 = " + java.lang.Math.pow(number,2));
      }   
   }
}

Code:
import java.util.Scanner;
import java.io.*;

public class SquareRoot
{
public static float number;

public static void main(String args[])
{
Scanner scan = new Scanner(System.in);
System.out.print("Number = ");
number = Float.parseFloat(scan.nextLine());
System.out.println(java.lang.Math.pow(number, 1./3));
}
}
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 2773


Keep Smiling, Let'em Wonder!


View Profile WWW
« Reply #1 on: January 04, 2008, 01:33:18 pm »

I am sorry but what is the purpose of the post?  Are you instructing?  Is this supposed to inform people?  The post is meaningless to except to the few that are Java guru's.
Logged

zilchuary
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #2 on: January 04, 2008, 01:35:00 pm »

Well .. do you understand it
Does it have to be like a tutorial?
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 2773


Keep Smiling, Let'em Wonder!


View Profile WWW
« Reply #3 on: January 04, 2008, 01:38:21 pm »

This is a support forum.  Be prepared to support and instruct usage of your postings.  I have no idea what that does or where it is supposed to be used. I hope someone else does and can say whether it even belongs in the forum.
Logged

simply sibyl
Global Moderator
*
Offline Offline

Posts: 6843



View Profile WWW
« Reply #4 on: January 04, 2008, 01:40:10 pm »

This is a support forum.  Be prepared to support and instruct usage of your postings.  I have no idea what that does or where it is supposed to be used. I hope someone else does and can say whether it even belongs in the forum.

LL the programming board here in support is for different programming languages.  The posts in it do not have to have anything to do with our forums, codes for them, etc.   Its all about programming and a place for them to discuss it.. its totally fine.
Logged

zilchuary
SMF For Free Newbie
*
Offline Offline

Posts: 11


View Profile
« Reply #5 on: January 04, 2008, 01:40:49 pm »

IT blongs in the JAVA Section right
cause its java
...
if you want me to help out with SMF Codes i will .. i can start in about 2 days
Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 2773


Keep Smiling, Let'em Wonder!


View Profile WWW
« Reply #6 on: January 04, 2008, 01:41:19 pm »

Ok, sorry.
Logged



Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.416 seconds with 18 queries.