Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.kasia;
- import java.sql.SQLOutput;
- public class Main {
- public static void main(String[] args) {
- int myValue=5;
- float MyFloat=5f;
- double Mydoule=5d;
- System.out.println("myintValue=" + myValue);
- System.out.println("myfloatValue=" + MyFloat);
- double kg=5.6d;
- double pound= 0.45359237d*kg;
- System.out.println(pound);
- double numPounds=200d;
- double numkg= numPounds*0.45359237d;
- System.out.println(numkg);
- char a='\u00A9';//unicode char
- System.out.println(a);
- boolean MyBoolean= false;
- boolean Isx = true;
- double x=20d;
- double y=80d;
- double sum25=(x+y)*25;
- double theRemainder= sum25/40;
- if(theRemainder<=20)
- System.out.println("yotal was over the limit");
- int player= CalculateHighScoreposition(5000);
- displayHighScorePosition("jan",player);
- }
- public static void displayHighScorePosition(String name,int x){
- System.out.println(name+ "managed to get position "+ x+ " on the high score table");
- }
- public static int CalculateHighScoreposition(int score)
- {
- if(score>1000)
- return 1;
- else if(score>500 && score<1000)
- return 2;
- else if (score>100 && score <500)
- return 3;
- else return 4;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement