nursingstudyhelp.com logo

Our Services

Get 15% Discount on your First Order

please review the information below  Submit the .cpp source code file(s) and lotto.txt on Ecampus. At the top of each .cpp program, put your Name

please review the information below 

Submit the .cpp source code file(s) and lotto.txt on Ecampus.

At the top of each .cpp program, put your Name and class as a comment

1. Create a text file named lotto.txt that contains all numbers chosen for Lotto Texas since the contest began in 1992.  Write a program named lotto.cpp that reads these numbers and prints the total numbers, their sum, and their average. In addition, calculate the frequency of each number.  Submit the lotto.txt file containing the numbers.

Program 1 Example Output

Statistics for Lotto Texas (1992 – present)
Total numbers: _____
Sum of these numbers: _____
Average of these numbers: _____

Frequency of Numbers:
#   Frequency
1 = ___
2 = ___
3 = ___
4 = ___

53 = ___
54 = ___         

2. Write a program called qp.cpp that prints a random quick pick for a lottery.  The quick pick should have six random numbers in the range (1 – 50).  The random numbers should not contain duplicates.  Your program should also print a random statement (from a list of at least 5).

Program 2 Example Output

Here is your Lotto Texas quick pick: 42 3 33 21 49 16
Gambling is a tax on people poor at math!

3. Write a program called palindrome.cpp that allows the user to enter a phrase.  It then prints the phrase in reverse, and lets the user know if it is a palindrome or not.

Program 3 Example Output

This program is used to detect a palindrome.
Please enter a word: Hello
Your word in reverse: olleH
This word is not a palindrome.

Make your program work with palindrome sentences.  For example:
A man, a plan, a canal: Panama.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Part A Observation and Assessment Play allows children to use their creativity while developing their imagination, dexterity,

Part A Observation and Assessment Play allows children to use their creativity while developing their imagination, dexterity, and physical, cognitive, and emotional strength. Play is important to healthy brain development. It is through play that children at a very early age engage and interact in the world around them. This assignment allows students to observe and assess children at play by using three

 Read the attached article within the module 11 (Patient Safety) along with cursory internet research regarding the RaDonda Vaught case to answer

 Read the attached article within the module 11 (Patient Safety) along with cursory internet research regarding the RaDonda Vaught case to answer following personal opinion and critical thinking questions: 1. Ethical and Professional Responsibilities: How does the RaDonda Vaught case shape your understanding of the ethical and professional responsibilities nurses

FINAL PROJECT/Essay questions: Debrief CIMA-0705 Today’s Educational Leaders

FINAL PROJECT/Essay questions: Debrief CIMA-0705 Today’s Educational Leaders For this final project/paper for this course, please write up a formal debrief from this course. We will use the reflective questioning model, “What, So what, and Now what?” This is a common debrief framework we use in healthcare simulation, and you may have

Reflection Instructions: Please respond to the following questions based upon these course objectives: · Solve mathematical equations · Simplify mathematical

Reflection Instructions: Please respond to the following questions based upon these course objectives: · Solve mathematical equations · Simplify mathematical expressions · Analyze functions Please answer the following questions with supporting examples and full explanations. 1. For each of the learning objectives, provide an analysis of how the course supported