This file contains hidden or 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.io.*; | |
//Convertir Centigrados a Farenheit, MXN a DLS, y resolver funcion de x// | |
public class ShakespeareanConverter { | |
public static void main(String[] args) throws IOException{ | |
InputStreamReader inStream = new InputStreamReader(System.in); | |
BufferedReader systemIn = new BufferedReader (inStream); | |
String c, f, mxn, dls, x; |
This file contains hidden or 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
/*4. An employee receives the regular pay rate for the first 30 hours and he is paid 1½ | |
times the normal rate for each hour over the 30 hours. Write a program (save it as | |
BonusWage) that prompts the user for the regular pay rate and the hours worked and | |
then it will calculate and display on screen the employee’s wage based on that | |
information and the criteria mentioned above. For example, if 42 is entered for hours and |
This file contains hidden or 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
/*3. Shirts are on sale for $10 each if more than three are purchased and $12 each | |
otherwise. Write a program (save it as Shirts) that prompts the user for the number of | |
shirts purchased and display on screen the total cost according to the mentioned criteria. | |
*/ | |
import java.util.Scanner; | |
import java.io.*; | |
public class Shirts { |
This file contains hidden or 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
/*2. Write a program (save it as PosNeg) that prompts the user for an integer number and | |
it would display on screen the message “The number is positive” if it is a positive number | |
and “The number is negative” if otherwise. | |
*/ | |
import java.util.Scanner; | |
import java.io.*; | |
public class PosNeg { |
This file contains hidden or 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
/*2. Write a program (save it as PosNeg) that prompts the user for an integer number and | |
it would display on screen the message “The number is positive” if it is a positive number | |
and “The number is negative” if otherwise. | |
*/ | |
import java.util.Scanner; | |
import java.io.*; | |
public class PosNeg { |
This file contains hidden or 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
/*1. Write a program (save it as Fever) that prompts the user for a patient’s temperature | |
and would display on screen if he/she has fever depending whether his/her temperature | |
exceeds 39° Celsius. If it is less than that, then the patient has normal temperature | |
*/ | |
import java.util.Scanner; | |
import java.io.*; | |
public class fever { | |
public static void main(String[] args) { |
This file contains hidden or 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
/*Your program asks for the item, its price, | |
and if overnight shipping is wanted. | |
Regular shipping for items under $10 is $2.00; | |
for items $10 or more shipping is $3.00. | |
For overnight delivery add $5.00.*/ | |
import java.util.Scanner; | |
import java.io.*; | |
public class Delicatessen{ | |
public static void main(String[] args) { |
This file contains hidden or 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.io.*; | |
import java.util.Scanner; | |
public class AsteriskTriangle { | |
public static void main (String [] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Type an integer: "); | |
int nmbr = input.nextInt(); |
This file contains hidden or 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.io.*; | |
import java.util.Scanner; | |
public class CountingLetters { | |
public static void main (String [] args) { | |
Scanner input = new Scanner(System.in); | |
String firstWord, secondWord | |
System.out.println("Enter first word: "); |
This file contains hidden or 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.io.*; | |
import java.util.Scanner; | |
public class elections2{ | |
public static void main (String[] args) { | |
Scanner input = new Scanner(System.in); | |
char candidate; | |
System.out.println("Please introduce your candidate. Introduce a character "); |
OlderNewer