pizza deals - MATLAB Cody - MATLAB Central

Problem 43615. pizza deals

Difficulty:Rate

Given two pizza slices of different sizes:

  • Slice A with angle alpha1, radius r1, and price p1
  • Slice B with angle alpha2, radius r2, and price p2

create a function that compares the two deals and returns

  • 1 if slice A is the better deal
  • 2 if slice B is the better deal
  • 0 if they are both equally good deals.

Solution Stats

40.65% Correct | 59.35% Incorrect
Last Solution submitted on Jul 25, 2024

Problem Comments

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers39

Suggested Problems

More from this Author14

Problem Tags

Community Treasure Hunt

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

Start Hunting!