Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are working for Zenni Optical- a company that aims to provide the most affordable eyeglasses with highest-quality optical lenses to people all over the

You are working for Zenni Optical- a company that aims to provide the most affordable eyeglasses with highest-quality optical lenses to people all over the world. Your project manager asked you to write a program that calculates the missing values for a given data as well as magnification using thin lens equation and identifies the type of the lens or mirror for each line of data. The data is in the following order: f s s'

Sample input:

10 20 x

y 10 30

-10 x 40

-5 10 x

10 m -30

9 30 z

0

Input:

1st value in each line indicates focal length

2nd value in each line indicates distance of object from the lens

3rd value in each line indicated the distance of image from the lens

0 marks the end of the input

Output:

4th value in the output indicates the magnification

5th value in the output indicates the type of the lens or mirror used

Sample output:

10.00 20.00 20.00 -1.00 c lens or concave mirror

7.50 10.00 30.00 -3.00 c lens or concave mirror

-10.00 -8.00 40.00 5.00 d lens or convex mirror

-5.00 10.00 -3.33 0.33 d lens or convex mirror

10.00 7.50 -30.00 4.00 c lens or concave mirror

9.00 30.00 12.86 -0.43 c lens or concave mirror

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions