Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Temperature
- {
- static int[] x = new int[7];
- public static void main(String[] Args) {
- Scanner scan = new Scanner(System.in);
- System.out.println("Enter Temperatures for the past week (seven days), one at a time");
- for (int count = 0; count < x.length; count++) {
- x[count] = scan.nextInt();
- }
- String[] y = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
- String temp = "The temperature for ";
- for (int count2 = 0; count2 < x.length; count2++) {
- System.out.println(temp + y[count2] + " is: " + x[count2] + " degrees");
- }
- //System.out.println("dis shee werken. we code now " + one);
- }
- public static int belowFrezing(){
- int count3;
- for (count3 = 0; count3 < x.length; count3++) {
- if (x[count3] < 33) {
- System.out.println("The temperatures below freezing are: " + x[count3]);
- }
- }
- return x[count3];
- }
- /*
- public static int aboveHundred(){
- int count4;
- for (count4 = 0; count4 < x.length; count4++) {
- if (x[count4] > 100) {
- System.out.println("The temperatures above 100 degrees are: " + x[count4]);
- }
- }
- return x[count4];
- }
- /*
- public static int twoDays() {
- }
- /*
- public static int descendTemp() {
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement