Cody

# Problem 1072. Television Screen Dimensions

Solution 2490572

Submitted on 7 Jun 2020 by Ramesh Kumar V
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
[W,H]=teledims(2.4,1,46); assert(H == 17.7 && W == 42.5)

a = 17.6923 b = 42.4615 H = 17.7000 W = 42.5000

2   Pass
[W,H]=teledims(4,3,32); assert(H == 19.2 && W == 25.6)

a = 19.2000 b = 25.6000 H = 19.2000 W = 25.6000

3   Pass
[W,H]=teledims(3,2,60); assert(H == 33.3 && W == 49.9)

a = 33.2820 b = 49.9230 H = 33.3000 W = 49.9000

4   Pass
[W,H]=teledims(1.85,1,42); assert(H == 20.0 && W == 36.9)

a = 19.9717 b = 36.9477 H = 20 W = 36.9000

5   Pass
[W,H]=teledims(3,2,1000); assert(H == 554.7 && W == 832.1)

a = 554.7002 b = 832.0503 H = 554.7000 W = 832.1000

6   Pass
[W,H]=teledims(16,10,92); assert(H == 48.8 && W == 78.0)

a = 48.7599 b = 78.0158 H = 48.8000 W = 78

7   Pass
[W,H]=teledims(2.4,1,92); assert(H == 35.4 && W == 84.9)

a = 35.3846 b = 84.9231 H = 35.4000 W = 84.9000

8   Pass
[W,H]=teledims(16,10,32); assert(H == 17.0 && W == 27.1)

a = 16.9600 b = 27.1359 H = 17 W = 27.1000

9   Pass
[W,H]=teledims(3,2,82); assert(H == 45.5 && W == 68.2)

a = 45.4854 b = 68.2281 H = 45.5000 W = 68.2000

10   Pass
[W,H]=teledims(16,10,82); assert(H == 43.5 && W == 69.5)

a = 43.4599 b = 69.5359 H = 43.5000 W = 69.5000

11   Pass
[W,H]=teledims(16,10,60); assert(H == 31.8 && W == 50.9)

a = 31.7999 b = 50.8799 H = 31.8000 W = 50.9000

12   Pass
[W,H]=teledims(3,2,92); assert(H == 51.0 && W == 76.5)

a = 51.0324 b = 76.5486 H = 51 W = 76.5000

13   Pass
[W,H]=teledims(1.85,1,1000); assert(H == 475.5 && W == 879.7)

a = 475.5170 b = 879.7065 H = 475.5000 W = 879.7000

14   Pass
[W,H]=teledims(2.4,1,42); assert(H == 16.2 && W == 38.8)

a = 16.1538 b = 38.7692 H = 16.2000 W = 38.8000

15   Pass
[W,H]=teledims(1.85,1,27); assert(H == 12.8 && W == 23.8)

a = 12.8390 b = 23.7521 H = 12.8000 W = 23.8000

16   Pass
[W,H]=teledims(16,10,82); assert(H == 43.5 && W == 69.5)

a = 43.4599 b = 69.5359 H = 43.5000 W = 69.5000

17   Pass
[W,H]=teledims(4,3,46); assert(H == 27.6 && W == 36.8)

a = 27.6000 b = 36.8000 H = 27.6000 W = 36.8000

18   Pass
[W,H]=teledims(2.4,1,60); assert(H == 23.1 && W == 55.4)

a = 23.0769 b = 55.3846 H = 23.1000 W = 55.4000

19   Pass
[W,H]=teledims(4,3,92); assert(H == 55.2 && W == 73.6)

a = 55.2000 b = 73.6000 H = 55.2000 W = 73.6000

20   Pass
[W,H]=teledims(1.85,1,60); assert(H == 28.5 && W == 52.8)

a = 28.5310 b = 52.7824 H = 28.5000 W = 52.8000

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!