Question: 6.24 duringLab: Sorta Sum Given 2 ints, a and b, return their sum. However, sums in the range 10..19 inclusive, are forbidden, so in that

6.24 duringLab: Sorta Sum Given 2 ints, a and b, return their sum. However, sums in the range 10..19 inclusive, are forbidden, so in that case just return 20. Note: use a local variable to store the result to allow a single return statement. sortaSum(3,4) 7 sorta Sum(9,4) 20 sortaSum(10, 11) 21 287212.1778258 LAB ACTIVITY 6.24.1: during Lab: Sorta Sum 0/4 Main.java Load default template... 1 public class Main { 2 public int sortaSum(int a, int b){ 4 /* Type your code here. */ } 6 7 8 9 10 11 12 // this method not used but needed for testing public static void main(String[] args) { } Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box Enter program input (optional) If your code requires input values, provide them here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
