Skip to content

Instantly share code, notes, and snippets.

@Azure-Agst
Created August 24, 2018 18:56
Show Gist options
  • Save Azure-Agst/33f2ff0af3a2d853515967b6291e3858 to your computer and use it in GitHub Desktop.
Save Azure-Agst/33f2ff0af3a2d853515967b6291e3858 to your computer and use it in GitHub Desktop.
jesus i hate T1L9A2
import java.lang.*;
// "Write the code to print a random integer from -20 to 20 inclusive using Math.random()."
//
// fuck you for not letting me use Math.round() or Math.floor().
// you'll just get a fucking if statement how about that?
// SUCK ME
public class Lesson_9_Activity_Two {
public static void main(String []args){
double num = ((Math.random() - 0.5) * 2) *21;
if (num > 20){
System.out.println(20);
} else if (num < -20) {
System.out.println(-20);
} else {
System.out.println((int)num);
}
}
}
@Azure-Agst
Copy link
Author

I'm so tilted at this lesson

@glfmn
Copy link

glfmn commented Sep 18, 2018

Does anyone really enjoy Java anyway?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment