Preview

Evidence For Chapter 8

Satisfactory Essays
Open Document
Open Document
501 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Evidence For Chapter 8
H/W Evidence for chapter 8 10/01/15
Euan Sarson (10W)

8.1 package chapter8;

public class PrimitiveIntegerArray { public static void main (String [] args){ int[] myLuckyNumber = new int[5]; myLuckyNumber[0] = 9; myLuckyNumber[1] = 11; myLuckyNumber[2] = 38; myLuckyNumber[3] = 2; myLuckyNumber[4] = 991; System.out.println(myLuckyNumber[0]); System.out.println(myLuckyNumber[1]); System.out.println(myLuckyNumber[2]); System.out.println(myLuckyNumber[3]); System.out.println(myLuckyNumber[4]);

}
}

8.2 package chapter8; import java.util.Random; import java.util.Scanner;

public class Lottery { public static void main (String [] args){ Scanner scanner = new Scanner(System.in); Random rand = new Random(); int[] number = new int[6]; number[0] = rand.nextInt(54) + 1; number[1] = rand.nextInt(54) + 1; number[2] = rand.nextInt(54) + 1; number[3] = rand.nextInt(54) + 1; number[4] = rand.nextInt(54) + 1; number[5] = rand.nextInt(54) + 1; int[] guess = new int[6]; System.out.println("Hello and welcome to the lottery.\nPlease enter your first number (1-54):"); guess[0] = scanner.nextInt(); System.out.println("Please enter your second number (1-54):"); guess[1] = scanner.nextInt(); System.out.println("Please enter your third number (1-54):"); guess[2] = scanner.nextInt(); System.out.println("Please enter your fourth number (1-54):"); guess[3] = scanner.nextInt(); System.out.println("Please enter your fifth number (1-54):"); guess[4] = scanner.nextInt(); System.out.println("And your Bonus Ball Number please (1-54):"); guess[5] = scanner.nextInt(); System.out.println("---> The winning lottery numbers are:"); System.out.println(number[0]+", "+number[1]+", "+number[2]+", "+number[3]+", "+number[4]); System.out.println("And the bonus ball is: "+number[5]); System.out.println("Would you like to see what you have won? \n[1] Yes\n[2] No"); int iYesorNo = scanner.nextInt();

You May Also Find These Documents Helpful

  • Satisfactory Essays

    1. No effect on current ratio, if already included in the allowance for doubtful accounts.…

    • 278 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Chapter 13

    • 1232 Words
    • 5 Pages

    The Asian trading network was before the Europeans had monopoly on the world trade system, the main “people” involved in this trade was the Arabs, Indians, and the Chinese. Each of these had their respective items to offer, such as glass, cotton, paper etc.…

    • 1232 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Chapter 13

    • 7027 Words
    • 41 Pages

    1. The tax benefit received from a tax credit is affected by the tax rate of the taxpayer.…

    • 7027 Words
    • 41 Pages
    Better Essays
  • Satisfactory Essays

    Chapter 13 Quiz

    • 256 Words
    • 2 Pages

    The most common task a DNS server performs is resolving a host name to an IP address. This is called a forward lookup.…

    • 256 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Auditing Chapter 4

    • 3567 Words
    • 15 Pages

    The Securities Exchange Act of 1934 offers recourse against the auditors to a far greater number of investors than does the Securities Act of 1933.…

    • 3567 Words
    • 15 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chapter 13 DBQ

    • 311 Words
    • 1 Page

    Identify, by number, the documents that are pro-absolutism and anti-absolutism. Pro-absolutism = 5 Anti-absolutism = 3…

    • 311 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    WHAP Chapter 13

    • 1326 Words
    • 5 Pages

    Essential Question: How much of an influence did Chinese culture have in the development of Japan, Korea and Vietnam?…

    • 1326 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Chapter 11

    • 768 Words
    • 10 Pages

    Demand influences on _______ decisions concern primarily the nature of the target market and expected reactions of consumers to a given price or change in price.…

    • 768 Words
    • 10 Pages
    Satisfactory Essays
  • Powerful Essays

    chapter 11

    • 1673 Words
    • 7 Pages

    Inventor of the water frame, he lowered the cost of cotton thread and increased the speed of production.…

    • 1673 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    Ap us chapter 11

    • 1373 Words
    • 6 Pages

    1. The handicaps the Federalists and Adams had running in the election of 1800 was their Alien and Sedition Act arousing a host of enemies, although most of these critics were dyed-in-the-wool Jeffersonians anyhow. Also, the refusal of Adams to give them a rousing fight with France was a handicap.…

    • 1373 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    Chapter 11

    • 324 Words
    • 1 Page

    1. Pyrolysis is quite important in the role of combustion of solid fuels because it is the actual act and is necessary in order for the item to ignite. It is the conversion of a solid to a gas form by using high heat. Without it, the fuel being heated appropriately, the gases won’t break apart and form into vapors that can then combust.…

    • 324 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    2. Josie expresses her wish to be free ‘if society will let (her)’ (page 40). What does she mean? Is her view of freedom a naive one?…

    • 1079 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Chapter 8: Mortgage Loans

    • 351 Words
    • 2 Pages

    One part of chapter 8 that I found interesting was the conversation between Jack and Betty about buying a new and nicer house. Du Bois states, “The price was high. The bank to which Jack applied refused a mortgage loan.” (Du Bois 110). I found this especially interesting because of my family history and housing. First my father’s parents were denied a mortgage loan on the house they now own. Although my grandparents were turned away, they decided to save their money for the next two years and offered to pay for the house in cash, luckily it was still on sale. After two years of being for sale, naturally the price went down, but my grandparents paid for the house for more then what was asked the second time around because the man was so stubborn. When they offered to pay in cash, that day, the man acquiesced.…

    • 351 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Sw Chapter 13

    • 443 Words
    • 2 Pages

    For this assignment, you will attend an approved* community/college cultural event and use the writing skills you will develop in English 101 to describe the event. Chapter 12 in SCW explains the mode of description and the elements found in a lively, interesting descriptive essay. This assignment will allow you to attend a campus cultural event, practice your writing skills, learn something new about your community and world, and get credit for it!…

    • 443 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Chapter 8 Discussion

    • 731 Words
    • 3 Pages

    6. A school is considering implementing an advanced placement physical education class to show support of the recognition that intelligence can take many forms. Do you agree or disagree with this idea? Why? Yes, because not all students are not book smart and not all students are good test takers, students that do not do well in the classroom have low self-esteem about…

    • 731 Words
    • 3 Pages
    Good Essays