Answer to Question #261075 in C++ for dan

Question #261075

char secretCode(int n){

    char letters[ ]= "abcdefghijklmnopqrstuvwxyz";

int number = n;

while (number >26){

number = number - 26;

}

return letters[number-1];

}



The code above runs perfectly well, 


1. what would be the return value if the argument value for parameter n is 243?


2. what would be the return value if the argument value for parameter n is 123?


3. what would be the return value if the argument value for parameter n is 12456?


4. what would be the return value if the argument value for parameter n is 345?


5. what would be the return value if the argument value for parameter n is 354?


6. what would be the return value if the argument value for parameter n is 456?



1
Expert's answer
2021-11-07T10:12:02-0500
  1. i
  2. s
  3. b
  4. g
  5. p
  6. n

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS