Winning number combinations from the missouri lottery

Assignment Help C/C++ Programming
Reference no: EM13168174

The file input.txt contains all of the winning number combinations from the Missouri Lottery since it took its current form on January 3, 1998.  The data is in a file called "input.txt"  All of the data in the file is integer.  You should read the file as integers and do calculations in integers as much as possible.  You are to read the data in the file and then print out the following information:

  • The total number of picks in the file (not counting the header row)
  • The number of times 7 was drawn and the percent of the total that 7's represent.
  • The number of times 13 was drawn and the percent of the total that 13's represent.

Use the format shown below.  Use the System.out.printf() command for the printing:

There were 9888 numbers read.
The number 7 was read 225 times (2.275%)
The number 13 was read 232 times (2.330%)

You should print your report from a method with a declaration similar to the following:

public static void printReport(int total, int sevens, int thirteens)

Reference no: EM13168174

Questions Cloud

The method takes an array : The method takes an array of integers and returns true if there exists any item in the array that satisfies a specified condition. For instance, the following code fragment:
Write a class volumeofbox that calculate the volume : write a class VolumeOfBox that calculate the volume by this formula : length * breadth *
Implement one class called parkingmeter : implement one class called parkingmeter, that is a simple model of a coin operated parking meter
Create a road class : Create a Road class. The class should have functions for setting the width of the road in feet and the length of the road in miles. It should also have functions for obtaining the width of the road the length of the road
Winning number combinations from the missouri lottery : The file input.txt contains all of the winning number combinations from the Missouri Lottery since it took its current form on January 3, 1998.  The data is in a file called "input.txt"  All of the data in the file is integer.
Write a computer program using q basic : write a computer program using q basic with the following information. We just started learning about loop commands but I'm completely lost. My teacher introduced the for next, do while, and do until loop commands and he suggested to use the for next..
The chief financial officer : The chief financial officer (CFO) of NCWR keeps a huge number of reports, spreadsheets, and other critical financial information on his computer, which runs Windows 7
Long-distance communication in a wan infrastructure : How can cables like UTP and coaxial cable be used for long-distance communication in a WAN infrastructure? Where are these cables used most often?
Catch clauses are listed is important : write a program that can be used to demonstrate that the order in which catch clauses are listed is important

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Use the getint and getintwithinrange methods

Use the getInt and getIntWithinRange methods to validate that each score ranges from 1 through 100 and add code that discards any extra entries at the prompt that asks if you want to enter another score to the application below.

  Generates numbers in the fibonacci sequence

Write a class called fibs that generates numbers in the Fibonacci sequence (each number is the sum of the previous two). The sequence starts 1, 1, 2, 3, 5, ...

  Write a pseudocode statement

Assume that a program has two string variables named str1 and str2. Write a pseudocode statement that assigns an all uppercase version of str1 to the str2 variable. is str.add(str1,str2) part of it?

  Write a recursive and iterative versions of binary search

in C++ write a recursive and iterative versions of binary search and compare their run times using the array a[i]=i, i=0,..., n-1

  Complete the design and implementation

Complete the design and implementation of the class customerType defined in the Programming Example Video Store. b. Design and implement the class customerListType to create and maintain a list of customers for the video store.

  Creates a macro to calculate the area

Build a program that creates a macro to calculate the area of a circle using the formula area = pie x radius x radius. In the same program, prompt the user to enter a circle's radius. Use the macro to calculate the circle's area and display the re..

  Write application to calculate price of carpeting for room

The Westfield Carpet Company has asked you to write an application that calculates the price of carpeting for rectangular rooms.

  Contacts class that contains an array

Create a Friend class that contains a first name, last name, a birthday, and a telephone number. Create a Contacts class that contains an array of Friend as well as the owner's name and cell phone Number.

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Write c program that forks two child processes

Write a C program that forks two child processes. The parent process will print all prime numbers up to 229, the first child process will print the first 50 Fibonacci numbers.

  Program that will calculate the heat transfer of a substance

write a program that will calculate the heat transfer of a substance (water) given three different shapes. The user has to be able to input the type of shape, so that the computer can calculate area, and plug it back in to the equation for heat trans..

  Displays columns titled "name", "quantity", "price", value

Write a program that displays columns titled "Name", "Quantity", "Price", and "Value". The fourth column contains the result of multiplying each item's quantity by its price. In addition, the program should calculate and display the total value of th..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd