Program that reads letters from a file called"inputlet.txt"

Assignment Help Computer Engineering
Reference no: EM1331365

Using only C (not c++) design the program described

General Requirements
? Write a program that reads letters from a file called"inputLet.txt".
? Your program will ask the user to enter the number of games they wish to play (1 to 4)
? This program should open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
? the test file will contain at least 15 letters, all lowercase
? When the number of games has been played, the program will end

? A preprocessor directive must be used to define the maximum number of guesses as 5
? If the player has used up all of their guesses, a message that the game is over should be displayed along with the letter they were trying to guess.
? You must have at least 4 user defined functions as follows:

//this function provides instructions to the user on how to play the game
void Instructions( );

//this function runs one game. It for checks either 5 incorrect guesses or correct guess.
//It returns a 0 if the game is over and the player did not guess the letter, otherwise it returns 1.

int PlayGuess(char solution);

//this function prompts the player to make a guess and returns that guess
//this function is called from inside the PlayGuess( ) function described above
char GetLetter( );

//this function takes two arguments, the guess from the player
//and the solution letter from the file.
//It lets the user know if the guess comes alphabetically before or after the answer
//The function returns 1 if the guess matches the solution and returns a 0 if they do not match
int CompareLetters(char guess, char solution);

Additional Requirements:
? Use function prototypes.
? Write comments for each function that will appear in the file before each prototype and again before each function definition.
? Be sure to comment your code adequately.
? Be sure to indent properly.
? Use meaningful variable names

Reference no: EM1331365

Questions Cloud

Prepare a presentation about competency-based hr programs : Prepare a presentation and a briefing paper about competency-based HR programs - How will such an approach strategically align the HR organization and facilitate the effective implementation of Stentor's business strategy
Program computes and prints the 1000th prime number : Write down a program that computes and prints the 1000th prime number using code blocks c++
Explain trends for security on the internet : What are the ebusiness trends for security on the internet? Research on internet viruses, trends in security software for the internet, and security features for online businesses.
Preventing employee fraud : Preventing Employee Fraud - Do you know what types of cash collecting procedures your company uses to safeguard against fraud?
Program that reads letters from a file called"inputlet.txt" : This program must open an inputLet.txt file , read in one character at a time and repeat this for the number of games the user wants to play.
Write financial information and report : Please include, as a second attachment, your Excel workbook that includes all of your work for ratios, trends analyses, and other assessment tools that you use.
Determine the characteristics of the new workplace : Conceptual, Human, and Technical Strengths - Determine the characteristics of the new workplace
Discussing the elements of an organizational culture : Discuss the elements of an organizational culture.
Explain example of what is brick and mortar : How can analyze the supply chain for the businesses in a "brick and mortar" environment? Explain how the supply chain was modified from "brick and mortar" by the web site.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Transcripting the case

The CTO of organization that has requested your services would like for your forensics team prepare a transcript of what you could state to CTO.

  How could pdp augment memory in evaluating

How could PDP augment memory in evaluating the potential risk in this and other potentially threatening situations.

  Analyze and write down a comparison of c++ pointers

Use safety and convenience as the primary considerations in the comparison and also consider fixed heap-dynamics variables.

  Write a java program that prints all real solutions

make a class QuadraticEquation whose constructor receives the coefficients a, b, c of the quadratic equation. Supply methods getSolution1 and getSolution2 that get the solutions, using the quadratic formula, or 0 if no solution exists. The getSolu..

  Object oriented design of a class

Object oriented design to develop a parent class known as Book which will receive the ISBN, author, title and price of book and select and print the details of all books with the price of more than $50.00.

  Utilizing the rsa protocol encrypt and decrypt messages

You are asked to hand-turn the RSA protocol in order to encrypt and decrypt the messages (utilizing smaller numbers than are used in the practice, so that calculations may be done through the hand).

  Applications of electronic data in health care field

Analyze the recent applications of the electronic data interchange within the health care field and find which is the most promising. Describe your rationale.

  Investigating a social engineering attack

Investigate a social engineering attack describing what has made this attack more successful and the information which was observed from this attack is sure to involve how could this attack be avoided.

  Implementing the code

Write down a complete program which declares an integer variable, reads a value from the keyboard into that variable. Write down a program which determines the mileage reimbursement for the salesperson at a rate of $.35 per mile.

  Make a method to calculate the value of entire inventory

Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in..

  What is the memory operations dominate execution time

What is  the memory operations dominate execution time

  How bandwidth affects the average consumer of technology

This solution provides the learner with an understanding on why it is important to understand the bandwidth needs for wide area networks. Further, this answer provides a dicussion on how bandwidth affects the average consumer of technology.

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