Computer Science, asked by airanvaibhav2955, 9 months ago

Fill in the missing lines of code so that the program accepts three integers separated by a delimiter and adds the first two integers and divides that sum by the third integer. Example Input/Output 1: Input: 54 : 6 : 30 Output: 2
The code is as follows:

Answers

Answered by harsha6286
24

Answer:

public class Main {

   public static void main(String[] args) {

       Scanner sc = new Scanner(System.in);

       int A = sc.nextInt();

       sc.next();

       int B = sc.nextInt();

       sc.next();

       int C = sc.nextInt();

       System.out.println((A+B)/C);

   }

}

Explanation:

you can find this in skillrack sc.next() desolves the delimiter so that we will get only the integers as output.

Answered by syed2020ashaels
0

The given question is that we have to write a

program accepts three integers separated by a delimiter and adds the first two integers and divides that sum by the third integer.

let us write a program

Input Numbers= input("Enter 3 integers separated by a delimeter")

elm= input N. split(":")

ans=elm[0]+elm[1]/elm[2]

print(ans)

Therefore, the output of the given program is the addition of two input is divided by the third input.

#spj2

https://brainly.in/question/32584999?referrer=searchResults

Similar questions