Cody

# Problem 44269. convert between ascii and characters

Solution 1706231

Submitted on 11 Jan 2019
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   Fail
C = 'b'; A = 122; CA_C = 98; AC_C = 'z'; [CA AC] = Ascii_Conversions(C,A); assert(isequal(CA,CA_C)) assert(strcmp(AC,AC_C))

Error: File: Ascii_Conversions.m Line: 1 Column: 1 The variable ans was mentioned more than once as an output. Error in Test1 (line 5) [CA AC] = Ascii_Conversions(C,A);

2   Fail
C = 'H'; A = 115; CA_C = 72; AC_C = 's'; [CA AC] = Ascii_Conversions(C,A); assert(isequal(CA,CA_C)) assert(strcmp(AC,AC_C))

Error: File: Ascii_Conversions.m Line: 1 Column: 1 The variable ans was mentioned more than once as an output. Error in Test2 (line 5) [CA AC] = Ascii_Conversions(C,A);

3   Fail
C = '/'; A = 50; CA_C = 47; AC_C = '2'; [CA AC] = Ascii_Conversions(C,A); assert(isequal(CA,CA_C)) assert(strcmp(AC,AC_C))

Error: File: Ascii_Conversions.m Line: 1 Column: 1 The variable ans was mentioned more than once as an output. Error in Test3 (line 5) [CA AC] = Ascii_Conversions(C,A);

4   Fail
C = '}'; A = 64; CA_C = 125; AC_C = '@'; [CA AC] = Ascii_Conversions(C,A); assert(isequal(CA,CA_C)) assert(strcmp(AC,AC_C))

Error: File: Ascii_Conversions.m Line: 1 Column: 1 The variable ans was mentioned more than once as an output. Error in Test4 (line 5) [CA AC] = Ascii_Conversions(C,A);