This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class P04FullHouseWithJokers { | |
public static void main(String[] args) { | |
int counterMain = 1; | |
System.out.println("* * * * *"); // fullHouse00 | |
counterMain = fullHouse23(counterMain); | |
counterMain = fullHouse13(counterMain); | |
counterMain = fullHouse22(counterMain); | |
counterMain = fullHouse12(counterMain); | |
counterMain = fullHouse03(counterMain); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class P09PointsInsideHouse { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
double x = scan.nextDouble(); | |
double y = scan.nextDouble(); | |
//To simplify the problem let's divide the roof into 2 triangles | |
//at the line (17.5, 3)(17.5, 8.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class SumOf5Numbers | |
{ | |
static void Main() | |
{ | |
Console.WriteLine("Please enter 5 numbers separated by space:"); | |
string input = Console.ReadLine(); | |
string[] numbersText = input.Split(); | |
double[] numbers = new double[5]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class BeerTime | |
{ | |
static void Main() | |
{ | |
DateTime timeBeer = new DateTime(); | |
Console.Write("Enter time: "); | |
bool isValid = DateTime.TryParse(Console.ReadLine(), out timeBeer); | |
if (isValid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class ZeroSubset | |
{ | |
static void Main() | |
{ | |
int n1 = 0; | |
int n2 = 0; | |
int n3 = 0; | |
int n4 = 0; |