C++ Control Flow Statements 6

Question:9
C++ program to take input for a two-digit number and print sum of the digits?
Sol:

Question:10
C++ program to take input for a 3 digit number and print sum of the digits?
Sol:

Question:11
C++ program to take input for a 3 digit number,calculate and print sum 1st and last digits?
Sol: