Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 (10 marks) Complete the program in a blank box given below with appropriate C statements that ask a user to enter a negative

image text in transcribed

Question 2 (10 marks) Complete the program in a blank box given below with appropriate C statements that ask a user to enter a negative integer and ends with O. Based on the entered data, calculate the percentage of negative integers greater than-10. Sample output of the completed code is as follows in Figure 2: Enter a negative integer or 0 to stop: -9 -9 is greater than-10! Enter a negative integer or 0 to stop: -8 -8 is greater than -10! Enter a negative integer or 0 to stop: -23 -23 is less than -10. Enter a negative integer or 0 to stop: -6 -6 is greater than-10! Enter a negative integer or 0 to stop: -5 -5 is greater than -10. Enter a negative integer or 0 to stop: 0 The percentage of negative integers greater than -10 entered is 80.0% ! Figure 2: Sample of completed code Your answer should follow the format given below; int main() // Variables definitions // Prompt user to enter data with the following message and display the entered data // "Enter a negative integer or 0 to stop:" // Read a number 1/ Calculate the percentage of negative integers greater than -10

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

=+What kinds of problems need to be overcome?

Answered: 1 week ago

Question

=+Describe an important trade-off you recently faced

Answered: 1 week ago