heya!! WRITE A PROGRAM TO INTILIZE VALUE OF TWO INTEGERS AND PRINT THE SUM AND AVERAGE.
Answers
Answered by
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
2
Refer to the attachment for the answer.
Hope it helps..!
#BeBrainly❤️
Attachments:
Similar questions
Accountancy,
5 months ago
Computer Science,
5 months ago
Math,
5 months ago
Math,
11 months ago
Science,
11 months ago
Physics,
1 year ago
Science,
1 year ago
CBSE BOARD X,
1 year ago