Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use stdio.h And also add comments explaining your code Declared the array of integers within the main function int data ar-(-3,5,6,7, 12,3,4,6, 19,23, 100,3,4, -2,9,43,32,45,32,

image text in transcribed
Use stdio.h
And also add comments explaining your code
Declared the array of integers within the main function int data ar-(-3,5,6,7, 12,3,4,6, 19,23, 100,3,4, -2,9,43,32,45,32, 2,3,2,-1); 3 Doors (20 points) Consider the following game: There are 100 doors (numbered 1 through 100) and 100 students labeled with ids from 1 to 100 waiting in a line. Initially, all the doors are closed. A student with and id r passes through all the doors that are multiples of r (i.e., student with id z goes to doors labeled with r, 2r, 3r, ...) and changes the status of each door, i.e., opens the door if it is closed or closes the door if it is open. After all the students complete their turns, which doors remain open? Write a C program that mimics this experiment and prints the labels of doors that remain open after all students in line have passed through the doors. Moreover, it prints the number of doors that remained open. For this problem, submit your pseudocode 4 Hangman (20 points) Write an interactive program that plays a game of hangman. Store the characters of the word to be guessed in an array of type char (you can initialize your character array at declaration). Words are seven letters long. Initially the program displays the length of the word to be guessed. This is in the form of successive stars (see example). The player guesses letters belonging to the secret word one by one. After each guess, the letters that have been guessed and the uumber of wrong guesses are displayed on screen. Your program should terminate when either the entire word is guessed or 4 incorrect guesses have been attempted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

2. How do they influence my actions?

Answered: 1 week ago

Question

5. If yes, then why?

Answered: 1 week ago