Java Card game
Play a game of cards. The program draws cards for you and itself, then compares the values to determine who got the higher one.
Play a game of cards. The program draws cards for you and itself, then compares the values to determine who got the higher one.
Program asks for information of two cars, saves them to objects and prints them to the user.
Program shows the exchange rate (Doesn’t show real rates) for a requested sum between euros and USD. Edit: Testing GitHub Gists Old: import java.util.Scanner; public class CurrencyTranslator { Scanner reader=new Scanner(System.in); boolean repeat=true; double euroTOdollar=1.18;//€->$ rate double dollarTOeuro=0.85;//$->€ rate private void run(){ System.out.println(“*******************\nCurrency translator 1.0”); while(repeat){ int requestedOperation=getOperation();//euro->dollar or dollar->euro or exit executeRequestedOperation(requestedOperation); } }… Read More »
This program counts the sum of odd numbers between two given numbers. SumOdds.java import java.util.Scanner; public class SumOdds { public void run() { Scanner reader = new Scanner(System.in); int lowLimit, upLimit, even, sum=0; System.out.println(“Enter lower and upper limit. The sum of odd numbers will be counted between the limits.”); lowLimit=reader.nextInt(); upLimit=reader.nextInt(); reader.close(); //swap places without… Read More »