Skip to content

Instantly share code, notes, and snippets.

//Convertanupper-caselettertoalowercaseletterandreturnthelower
//case letter. (Hint: Check first to be sure that it is not lower case already.)
import java.util.Scanner;
public class dacase {
public static void main(String[]args){
Scanner input = new Scanner(System.in);
char a = input.nextln();
char b = a.charAt(0);
import java.util.Scanner;
public class rowscols {
public static void main (String [] args) {
Scanner input = new Scanner(System.in);
int para1 = input.nextInt();
import java.io.*;
import java.util.*;
public class searchAndDestroy {
public static void main(String[] args) throws IOException{
Scanner input = new Scanner(System.in);
//Establish array length
/*1. Write a method dedup that reads strings from standard
input and prints them on standard output with all duplicates
removed (in sorted order).*/
import java.io.*;
import java.util.Scanner;
public class dedup{
public static void main(String[] args){
/* Modify the binarySearch method so that if the search key is not in the
array, it returns the largest index i for which a[i] is smaller than key (or -1 if
no such index exists).*/
import java.io.*;
import java.util.Scanner;
/*3. Integer sort: Write a method integerSort that takes from standard input a
sequence of integers that are between 0 and 99 and prints the same
integers in sorted order on standard output. For example, presented with
the input sequence*/
import java.io.*;
import java.util.Scanner;
import java.util.Scanner;
import java.io.*;
public class closestPair {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
int a = input.nextInt();
int c = a-1;
Random num = new Random();
import java.util.Scanner;
import java.io.*;
public class farthestPair {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
import java.util.Scanner;
import java.io.*;
public class majority {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
public class myCircle{
int rad = 1, x, y;
MyPoint center;
double area = null;
public MyCircle(int xVal, int yVal, int rad){
rad = 1;
x = xVal;
y = yVal;