Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

According to the number of days (minimum 1, maximum 30) entered on the keyboard and the temperature values of the days; Find the first value

According to the number of days (minimum 1, maximum 30) entered on the keyboard and the temperature values of the days; Find the first value that will make the total temperature zero (0) when it is multiplied by -1 and write the C program that displays it on the screen. If the number of days entered from the keyboard is out of the limit values, the program should warn the user and ask to be re-entered. In the program, there must be a function called Find the reset. According to the number of days sent and the temperature values of the days; Returns the sequence number of the first value that resets the sum when multiplied by -1. If there is no such value, it returns -1. Do not forget to use a prototype.

EX:

Enter the number of days (min 1 - max 30): 35 Error!! Re-enter the number of days (min 1 - max 30): 55 Error!! Re-enter the number of days (min 1 - max 30): 5 Enter the temperature for 5 days: 1 3 -5 4 3 -------------------------------------------------- -------- The first value that resets the sum of temperature when multiplied by -1 is in the 2nd row.

EX)2

Enter the number of days (min 1 - max 30): 4 Enter the temperature for 4 days: 1 2 4 8 -------------------------------------------------- -------- There is no value to reset the sum of temperature when multiplied by -1.

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

Beginning VB.NET Databases

Authors: Thearon Willis

1st Edition

1594864217, 978-1594864216

More Books

Students also viewed these Databases questions

Question

=+50. Now deduce Theorem 3.3 from part (a).

Answered: 1 week ago