Cherish J.

asked • 01/27/24

Given two double variables, x and y, which have been declared and initialized. Declare a double variable avg and assign the average of x and y to avg.

Sample runs

Input 1:

3 4

Output 1:

3.5

Input 2:

-2.4 4

Output 2:

0.8


1 Expert Answer

By:

Jessica M. answered • 01/28/24

Tutor
New to Wyzant

PhD with 5+ years of tutoring Computer Science

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.