Reference no: EM132460764
TECH 104 Programming Fundamentals - C Programming Assignment, Humber College, Canada
Lab - Strings
Write a program that finds the "smallest" and "largest" in a series of words. After the user enters the words, the program will determine which words would come first and last if the words were listed in dictionary order. The program must stop accepting input when the user enters a four-lettered word.
1) Use two strings named smallest_word and largest_word to keep track of the "smallest" and "largest" words entered so far. Assume that no word is more than 20 letters long.
2) Use a third string with a name current_word. The current_word will store every word entered by the user.
3) Prompt the user to enter a word.
4) Use a read_line function from slide 13 of lesson 10 to get the string from the user (Pass current_word and its size to read_line. Convert return type of read_line to void)
5) In your main program, use strcpy function to copy current_word into smallest_word and largest_word, respectively.
6) Use strlen for condition of while loop to determine when the user has entered a four-letter word.
Inside while loop
7) Prompt the user again to enter a word.
8) Call read_line function.
9) Use an if statement with condition using strcmp to compare current_word with smallest_word; if the new word is "smaller", use strcpy to save it in smallest_word.
10) Use an if statement with condition using strcmp to compare current_word with largest_word; if the new word is "larger", use strcpy to save it in largest_word.

Note that if you #include <stdlib.h> you can use system("pause"); and system("cls"); to pause your program or clear the screen.
In a word document provide a cut and paste of your .c code as well as an image of your program output for one menu option. Submit your word document through blackboard. Remember to include <string.h>.
Derive the algebraic equation for the isorevenue line
: Derive the algebraic equation for the isorevenue line. Explain the significance of the intercept and the slope of the isorevenue line
|
Decision rule for choosing the optimal combination of output
: Explain why this must be true. Explain the decision rule for choosing the optimal combination of output that maximizes profit.
|
Write about the army leadership argumentative paper
: Why you think that particular aspect of leadership is the most important, with respect to the duty positions and responsibilities of a Captain in the U.S. Army
|
What is the optimal level of production of wine decanters
: What is the optimal level of production of wine decanters? What the marginal revenue of the last decanter sold.
|
TECH 104 Programming Fundamentals - C Programming Assignment
: TECH 104 Programming Fundamentals - C Programming Assignment Help and Solution, Humber College, Canada. Write program that finds smallest series of words
|
Rate of new-product development in countries
: What factors affect the rate of new-product development in countries?
|
COU103A Human development across the life span Assignment
: COU103A Human development across the life span Assignment Help and Solution, Torrens University - Assessment Writing Service - Developmental period.
|
Uniform pricing-3rd degree price discrimination
: If the fixed cost is 150,000 per month, marginal cost is 50.00, price is 50.00, Qd is 14,455 what is the formula to calculate the profits and what is the profit
|
Discuss role of discretion in decision made by public safety
: Discuss the role of discretion in decisions made by public safety,Discuss the importance of decision-making as a skill for public safety leaders.
|