Create a program that asks the user for the size of the array of fears and then integer inputs which represents a certain fear. Store these integer inputs in the array of fears you created after getting the size. Then, ask the user for the value of x which represents the fear of the stranger we're helping. Finally, go through the array of fears and check if the fear of the stranger is not in the array of fears. If it is not in there, print "You have nothing to worry about". Otherwise, just be silent...
Create a program that asks the user for the size of the array of fears and then integer inputs which represents a certain fear. Store these integer inputs in the array of fears you created after getting the size. Then, ask the user for the value of x which represents the fear of the stranger we're helping. Finally, go through the array of fears and check if the fear of the stranger is not in the array of fears. If it is not in there, print "You have nothing to worry about". Otherwise, just be silent...
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
4. Do I Have a Real Fear?
by CodeChum Admin
Shux, I'm starting to get back up but I feel like I'm scared. Life seems too overwhelming.
Wait, what are you saying? Are you saying I don't have to worry about anything because my fear is non-existent in an array of fears?
Instructions:
- Create a program that asks the user for the size of the array of fears and then integer inputs which represents a certain fear. Store these integer inputs in the array of fears you created after getting the size.
- Then, ask the user for the value of x which represents the fear of the stranger we're helping.
- Finally, go through the array of fears and check if the fear of the stranger is not in the array of fears. If it is not in there, print "You have nothing to worry about". Otherwise, just be silent...
Input
1. Size of the array of fears
2. Series of integer values representing the fears
3. Value of x representing the fear of the stranger
Output
Enter the size: 5
Enter fear #1: -3
Enter fear #2: 4
Enter fear #3: 10
Enter fear #4: 1
Enter fear #5: 15
Enter the value of x: 9
You have nothing to worry about
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education