Computer Science, asked by maitreyee23, 11 months ago

heya!! WRITE A PROGRAM TO INTILIZE VALUE OF TWO INTEGERS AND PRINT THE SUM AND AVERAGE.​

Answers

Answered by PranathP
7

Answer:

import java.util.Scanner;

class average

{

public static void main (String args[])

{

Scanner sc = new Scanner (System.in);

Systems.out.println("Enter two integers.");

int a = sc.nextInt();

int b = sc.nextInt();

double ave = a+b/2.0;

System.out.println("Average of the two numbers is" + ave);

}

}

Answered by AshStyles
2

Refer to the attachment for the answer.

Hope it helps..!

#BeBrainly❤️

Attachments:
Similar questions