Page 2 of 2

PostPosted: Mon Feb 09, 2009 10:43 am
by Sabre
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 */

PostPosted: Mon Feb 09, 2009 10:54 am
by bigmick
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.

PostPosted: Mon Feb 09, 2009 10:56 am
by GYBS
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 .

PostPosted: Mon Feb 09, 2009 11:24 am
by oakton
I only know COBOL

PostPosted: Mon Feb 09, 2009 11:36 am
by Sabre
oakton wrote:I only know COBOL

Which means you're older than 30  :D

PostPosted: Mon Feb 09, 2009 12:37 pm
by anfieldadorer
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

PostPosted: Mon Feb 09, 2009 1:34 pm
by mistyred
Image

PostPosted: Mon Feb 09, 2009 2:32 pm
by SupitsJonF
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.