write a program to input 2 integers using scanner and find the product of their sum and average??
Answers
Answered by
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
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
Physics,
2 months ago
History,
2 months ago
Computer Science,
4 months ago
Social Sciences,
10 months ago
CBSE BOARD X,
10 months ago