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

  Write a menu-driven c program

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

  Write the output of the program

Design a C++ program that will interactively prompt for and read the name of the input file interactively prompt for and read the name of a file to write the output of the program to write the following to the specified output file your name, sect..

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Write a function that finds area and volume of a cube

write a function that finds area and volume of a cube when length is input and then write a program to test it. here is what i have so far.

  The use of decision logic

The use of decision logic is one of the major concepts of computer programming.

  Write in c++ another overloaded operator

Write in C++ another overloaded operator to go in the program that has Treasury. Overload the forward slash /  so that in the main program, you can declare sale to be of type Treasury, and commission to be of type Treasury, and commispctage to be of ..

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Create a boolean function that computes

Create a Boolean function that computes the value of a factorial for values up to including 10. Include comments about how to use the function and describing how it works.

  Reads a line of characters from the user

Write a segment of code (not an entire program) that reads a line of characters from the user and outputs "too long" if the user enters more than 5 characters (not counting hitting the enter/return key).

  Create a website that would allow users to enter and submit

Create a Website that would allow users to enter and submit survey

  Dynamically allocates an array large enough

Write a program that dynamically allocates an array large enough to hold a number of test score. The size of the array should be input by the user

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