Cody

Problem 2498. Whole Number Concatenator

Solution 2616499

Submitted on 26 Jun 2020 by Jens Kjærgaard Boldsen
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
a=111; b=444; N_correct=111444; assert(isequal(numcat(a,b),N_correct))

N = 111 N = 111444

2   Pass
a=1; b=2; c=3; d=4; f=5; N_correct=12345; assert(isequal(numcat(a,b,c,d,f),N_correct))

N = 1 N = 12 N = 123 N = 1234 N = 12345

3   Pass
a=2; b=3; c=5; d=7; f=11; g=13; h=17; k=19; l=23; m=29; n=31; N_correct=235711131719232931; assert(isequal(numcat(a,b,c,d,f,g,h,k,l,m,n),N_correct))

N = 2 N = 23 N = 235 N = 2357 N = 235711 N = 23571113 N = 2.3571e+09 N = 2.3571e+11 N = 2.3571e+13 N = 2.3571e+15 N = 2.3571e+17

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!