Recursion programs/data/questions finished

This commit is contained in:
Xevion
2020-11-27 00:30:18 -06:00
parent cd721c514a
commit cec8ed8317
20 changed files with 363 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
//© A+ Computer Science - www.apluscompsci.com
//Name - Ryan Walters
//Date - November 12th, 2020
//Class - Computer Science II Honors
//Lab - Labs 09b
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import static java.lang.System.out;
public class Lab09b {
public static void main(String args[]) throws FileNotFoundException {
Scanner input = new Scanner(new File("./src/lab09b.dat"));
while (input.hasNextLine()) {
Scanner line = new Scanner(input.nextLine());
// Get inputs, begin counting at defined coordinate
int r = line.nextInt();
int c = line.nextInt();
out.println(String.format("%d %d has %d @s connected.", r, c, AtCounter.countAts(r, c)));
AtCounter.reset();
}
}
}