Question: Write a C program with a filename netID_intarray.c that has 2 arrays. One is a two-dimensional array of strings which contains 5 words, each word

Write a C program with a filename netID_intarray.c that has 2 arrays. One is a two-dimensional array of strings which contains 5 words, each word can be a max of 20 characters long. The list of strings should be static in your code. The second integer array is populated by prompting the user for 10 integers to be stored in the array.

Here is the simple output:

$ ./run Number Work Enter integer 1 for the array: 45 Enter integer 2 for the array: 21 Enter integer 3 for the array: 22 Enter integer 4 for the array: 2 Enter integer 5 for the array: 3 Enter integer 6 for the array: 8 Enter integer 7 for the array: 5 Enter integer 8 for the array: 3 Enter integer 9 for the array: 5 Enter integer 10 for the array: 65 The sum of the integers in the array is 179. The integer average is 17. There are 3 even integers and 7 odd integers. Word Game Guess a word in the list: hi The word "hi" was not in the list. The words in the list were: hello pumpkin two numbers watermelon $./run Number Work Enter integer 1 for the array: 6 Enter integer 2 for the array: 1 Enter integer 3 for the array: 54 Enter integer 4 for the array: 77 Enter integer 5 for the array: 8 Enter integer 6 for the array: 9 Enter integer 7 for the array: 1 Enter integer 8 for the array: 2 Enter integer 9 for the array: 3 Enter integer 10 for the array: 6 The sum of the integers in the array is 167. The integer average is 16. There are 5 even integers and 5 odd integers. Word Game Guess a word in the list: pumpkin You guessed right!! The list has pumpkin!! The other words in the list were: hello two numbers watermelon 

Requirements

  • Integers will be saved in an array at time of input.
  • The program will then calculate and print out
    • the sum
    • integer average
  • Count and print the number of even and odd integers
  • Prompt the user to guess a word in the list
    • If the guess is correct print the rest of the words in the list
    • If the guess is incorrect print the entire list of words

Please help me with these problem ASAP, I would upvote your answer!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!