WAP to enter 4-digit number and display the sum of the first two digits and the last two digits of the given number. [Example: 1234,Output: 12+34=46]
Answers
Answered by
1
Answer:
Input : n = 687 Output : 21 Input : n = 12 Output : 3 ... General Algorithm for sum of digits in a given number: ... So on the First call it will have the last digit. As we
Similar questions
Social Sciences,
1 month ago
History,
1 month ago
English,
2 months ago
Social Sciences,
2 months ago
English,
10 months ago
Economy,
10 months ago