Computer Science, asked by tamannashaik456, 4 months ago

Write a
program to input a float an int and a
double value. Find the sum product and average
Also check if average is greater than product or not.​

Answers

Answered by AnindaBasu
2

Answer:

import java.util.*;

class average

{

public static void main (String args [ ] )

{

int a;

float b;

double c,avg,sum,pro;

Scanner sc=new Scanner(System.in);

System.out.println("Enter the Int value");

a=sc.nextInt();

System.out.println("Enter the Float value");

b=sc.nextFloat();

System.out.println("Enter the Double value");

c=sc.nextDouble();

sum=a+b+c;

System.out.println("Sum = "+sum);

pro=a*b*c;

System.out.println("Product = "+pro);

avg=sum/3.0;

System.out.println("Average = "+avg);

}

}

Similar questions