Computer Science, asked by tanishajoshi05, 4 months ago

write a program to input 2 integers using scanner and find the product of their sum and average??​

Answers

Answered by sambhavgautam6
2

sum=0

for i in range(2):

a=int(input("enter the number::"))

sum+=a

avg=sum/3

product = avg * sum

print("sum is::",sum)

print("avg is::",avg)

print("product of their sum and average::",product)

Answered by CopyThat
4

JAVA:-

import java.util.*;

class Brainly

{

static void main()

{

Scanner sc=new Scanner(System.in);

int a,b,c,d,e;

System.out.println(“Enter 2 integers:”);

a=sc.nextInt();

b=sc.nextInt();

c=a+b;

d=a-b;

e=c*d;

System.out.println(“Product=”+e);

}

}

Similar questions