Problem 44306. Is it really a 5?

Created by goc3 in Community

A number containing at least one five will be passed to your function, which must return true or false depending upon whether the English spelling of the number may contain "five" anywhere. For example:

 n = 5; return true since it is spelled "five"
 n = 15; return false since it is spelled "fifteen" and does not contain the four-letter string "five"

This criterion applies to any common spelling of the number. For example, 1500 can be written fifteen hundred. But, it can also be written one thousand five hundred. So, 1500 would be considered to contain a "five" for this problem.

See the test suite for more examples.

Solution Stats

24.36% Correct | 75.64% Incorrect
Last solution submitted on Mar 26, 2019

Problem Comments

Solution Comments

Recent Solvers236

Suggested Problems

More from this Author161

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!