7 kyu

Coding 3min: Give me the equation

Description:

This is the simple version of Shortest Code series. If you need some challenges, please try the challenge version

Task:

Give you three numbers:a b c,please return an equation(Operators include +,-,*,/), return type is string.

For example:

sc(1,2,3) should return "1+2=3" or "2+1=3" or "3-2=1" or "3-1=2"

sc(2,2,4) should return "2+2=4" or "2*2=4" or "4/2=2" or "4-2=2"

sc(6,2,3) should return "2*3=6" or "3*2=6" or "6/2=3" or "6/3=2"

Return one of the possible answer, you can pass the test.

If there is no equation between a,b,c, return ""

Series:

Puzzles
Games

Stats:

CreatedApr 1, 2016
PublishedApr 1, 2016
Warriors Trained568
Total Skips4
Total Code Submissions1205
Total Times Completed302
JavaScript Completions302
Total Stars13
% of votes with a positive feedback rating91% of 97
Total "Very Satisfied" Votes82
Total "Somewhat Satisfied" Votes13
Total "Not Satisfied" Votes2
Ad
Contributors
  • myjinxin2015 Avatar
  • smile67 Avatar
  • user9644768 Avatar
Ad