Forum Comments

3/2/22 - Reviewing Computer Number Systems, Recursive Functions, and WDTFD
In ACSL Contest Prep
2/16/22 - Assembly Language
In ACSL Contest Prep
Davey Yu
Mar 03, 2022
3797 3
0
0
2/2/22 - Graph Theory
In ACSL Contest Prep
Davey Yu
Feb 10, 2022
1. 2. 3 3.
Content media
0
0
1/5/2022 - Data Structures
In ACSL Contest Prep
Davey Yu
Jan 13, 2022
E A,B,E,O,W,W 3. T
Content media
0
0
12/1/21 - LISP and User-Created Functions
In ACSL Contest Prep
11/17/21 - Continuing Bitstring Flicking
In ACSL Contest Prep
11/10/21 - Bitstring Flicking
In ACSL Contest Prep
10/27/21 - Prefix & Postfix
In ACSL Contest Prep
10/13/21 - WDTPD, Strings, Arrays
In ACSL Contest Prep
Davey Yu
Oct 20, 2021
5 1
0
0
9/29/21 - Recursive Functions
In ACSL Contest Prep
Davey Yu
Oct 06, 2021
15 C E
0
0
9/22/21 - Recursive Functions
In ACSL Contest Prep
10/19 Homework: Recursion
In CS Fundamentals for ACSL
Davey Yu
Oct 25, 2020
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner (System.in); System.out.println("Scanner is now ready"); System.out.println("Input whatever you need to."); ArrayList<String> inputcenter = new ArrayList<String>(); for(int i = 0; i<5; i++){ String Input = in.nextLine(); Input = Input.replaceAll(", ",""); inputcenter.add(Input); } int x = 0; while(x<5){ } String lead = inputcenter.get(x).substring(1,1); int y = 2; int z = 3; String sendhelp = ""; String topCard = "9"; String bottemCard = "9"; ArrayList<String> dealerCards = new ArrayList<String>(); ArrayList<String> qualifiedCards = new ArrayList<String>(); for(int i = 1; i <= 5; i++) { sendhelp = inputcenter.get(x).substring(y,z); y = y + 2; z = z + 2; dealerCards.add(sendhelp); } for(int i = 0; i < 5; i++) { if((dealerCards.get(i).charAt(1)) == lead.charAt(1)){ qualifiedCards.add(dealerCards.get(i)); } } for(int i = 0; i < qualifiedCards.size(); i++){ if(qualifiedCards.get(i).charAt(0) > lead.charAt(0)) { if(Character.getNumericValue((qualifiedCards.get(i).charAt(0))) < Character.getNumericValue((topCard.charAt(0)))){ topCard = qualifiedCards.get(i); } } else if(Character.getNumericValue((qualifiedCards.get(i).charAt(0))) < Character.getNumericValue((bottemCard.charAt(0)))){ bottemCard = qualifiedCards.get(i); } else { continue; } } boolean empty = qualifiedCards.isEmpty(); if(empty == true) { System.out.println("None"); } else if(topCard != "99"){ System.out.println(topCard); } else{ System.out.println(bottemCard); } in.close(); } } 2) f(6,3) = 22
0
0
Davey Yu
More actions