Computer Science, asked by brainy1358, 5 months ago

2.6 Write a program to take n integers from command line and
print their sum of product (product of first number and last
number added to product of second number and second last
number and so on).
2.7 Consider any two integers. Write a program to print sum of
their squares
2.8 write a program to print a roll no. Avagrage of two student​

Answers

Answered by Prakhar8651
0

Answer:

2.7

public static void ind()

{

Scanner sc=next Scanner(System.in);

double n, a ,e;

System.out.println("Enter first number ");

a=sc.nextDouble();

System.out.println("Enter second number ");

n=sc.nextDouble();

e=a*a+n*n;

System.out.println("The sum is "+e);

Similar questions