Anyone know java? - Basic stuff

Please use this forum for general Non-Football related chat

Postby Sabre » Mon Feb 09, 2009 10:43 am

public class SupitsIsLazy {
  public static void main(String[] args) {
    float num = 6.554165f;
    float round = Round(num,2);
    System.out.println("Do your homework Supits, yet, here you have the float rounded to two digits: " + round);
  }

  public static float Round(float Rval, int Rpl) {
  float p = (float)Math.pow(10,Rpl);
  Rval = Rval * p;
  float temporal = Math.round(Rval);
  return (float)temporal/p;


/* Java is for Gays */
Image
SOS member #1499

Drummerphil, never forgotten.
User avatar
Sabre
>> LFC Elite Member <<
 
Posts: 13178
Joined: Mon Oct 18, 2004 12:10 am
Location: San Sebastian (Spain)

Postby bigmick » Mon Feb 09, 2009 10:54 am

Sabre wrote:public class SupitsIsLazy {
  public static void main(String[] args) {
    float num = 6.554165f;
    float round = Round(num,2);
    System.out.println("Do your homework Supits, yet, here you have the float rounded to two digits: " + round);
  }

  public static float Round(float Rval, int Rpl) {
  float p = (float)Math.pow(10,Rpl);
  Rval = Rval * p;
  float temporal = Math.round(Rval);
  return (float)temporal/p;


/* Java is for Gays */

Sabre you really need to get that keyboard sorted out mate, I think you must have a loose connection or something. Total gobbledygook that fella.
"se e in una bottigla ed e bianco, e latte".
User avatar
bigmick
>> LFC Elite Member <<
 
Posts: 12166
Joined: Fri Sep 10, 2004 3:19 pm
Location: Wimbledon, London.

Postby GYBS » Mon Feb 09, 2009 10:56 am

He is basically saying that Supits is lazy needs to do his homework and Java is gay - all in Java speak . The last bit is right - Java is gay .
Image
User avatar
GYBS
>> LFC Elite Member <<
 
Posts: 8647
Joined: Mon Jul 28, 2008 5:42 pm
Location: Oxford

Postby oakton » Mon Feb 09, 2009 11:24 am

I only know COBOL
User avatar
oakton
 
Posts: 367
Joined: Fri May 14, 2004 5:36 pm

Postby Sabre » Mon Feb 09, 2009 11:36 am

oakton wrote:I only know COBOL

Which means you're older than 30  :D
Image
SOS member #1499

Drummerphil, never forgotten.
User avatar
Sabre
>> LFC Elite Member <<
 
Posts: 13178
Joined: Mon Oct 18, 2004 12:10 am
Location: San Sebastian (Spain)

Postby anfieldadorer » Mon Feb 09, 2009 12:37 pm

here you go


Image

:D

seriously, which part exactly you want to know?
i know a bit or two about java scripts, if that what you're on
Image
User avatar
anfieldadorer
>> LFC Elite Member <<
 
Posts: 4847
Joined: Mon Jan 26, 2004 10:40 am

Postby mistyred » Mon Feb 09, 2009 1:34 pm

Image
ImageImageImage
User avatar
mistyred
>> LFC Elite Member <<
 
Posts: 3777
Joined: Mon Aug 04, 2003 3:50 pm

Postby SupitsJonF » Mon Feb 09, 2009 2:32 pm

Sabre wrote:/* Java is for Gays */

I'm not gay sabre, its the stupid class!  :(.

Rounding isn't even an important part of the assignment, I just couldn't stand to look at the answer of my program anymore with 1000 decimals.  So I have to use a float num, which we didnt go over in class, we used double.

Thanks.
SupitsJonF
 
Posts: 2798
Joined: Wed Aug 22, 2007 5:35 am
Location: USA: NJ

Previous

Return to General Chat Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 20 guests