Skip to content

Instantly share code, notes, and snippets.

@JorgeOlvera
JorgeOlvera / months.java
Last active August 29, 2015 13:56
Given a number from 1 to 12, the program returns the corresponding month
//Givenanumberfrom1-12,returnthenameoftheappropriatemonth.
import java.util.Scanner;
public class months {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int onetotwelve = input.nextInt();
//ARRAY: Given an array of ints of ODD length,
//look at the first, last,
//and middle values in the array and return the largest. The array length will be a least 1.
import java.util.Scanner;
public class oddArray{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//for any given pair of intergers, print a statement that states whether the second is a multiple of the fist
import java.util.Scanner;
public class findMultiples {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.println("Please introduce two numbers, separated by the enter key");
int a = input.nextInt();
int b = input.nextInt();
import java.util.Scanner;
import java.io.*;
public class arrayReverser {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
int [] arrayA
= new int [5];
import java.util.Scanner;
import java.io.*;
public class arrayMerger {
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
int [] array1 = new int [5];
int [] array2 = new int [5];
@JorgeOlvera
JorgeOlvera / Fibonnaci
Created January 21, 2014 00:02
Fibonnaci Sequence 2
//1,1,2,3,5,8,13
//Fn = Fn-1 + Fn-2
import java.util.Scanner;
public class Fibonnaci {
public static void main (String[] args) {
int x = 1;
int z = 1;
@JorgeOlvera
JorgeOlvera / Fibonnaci Sequence
Created January 20, 2014 04:19
Fibonnaci Sequence
//1,1,2,3,5,8,13
//Fn = Fn-1 + Fn-2
import java.util.Scanner;
public class Fibonnaci {
public static void main (String[] args) {
int x = 1;
int z = 0
@JorgeOlvera
JorgeOlvera / sum2
Created December 2, 2013 06:28
Sum Program
import java.util.Scanner;
public class sum2{
public static void main (String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Introduce an interger");
int limit = input.nextInt();
int nueva = 0;
int nueva2 = 0;
import static java.lang.Integer.*;
import static java.lang.Math.*;
import java.util.*;
import java.io.*;
public class zilla{
public static void main(String[] args) throws Throwable{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
for(int c = 0, C = parseInt(in.readLine().trim()); c++ < C;){
in.readLine();in.readLine();
int limitzilla = 0, limitmecha = 0;
import java.util.Scanner;
import java.io.*;
import java.text.DecimalFormat;
public class financialManagement{
public static void main(String [] args) {
Scanner input = new Scanner(System.in);
double[] money;