Write a java program to input three integers and find their product without the '*' operator
Answers
Answered by
1
Question:
Write a program to input three integers and find their product without the '*' operator.
SOlution: [Using java]
import java.util.*;
public class Question
{
static void main()
{
Scanner sc=new Scanner(System.in);
int a,b,c,p;
float f,e;
System.out.println("Enter 3 integers: ");
a=sc.nextInt();
b=sc.nextInt();
c=sc.nextInt();
f=(float)1/b;
e=(float)1/c;
p=(int)(a/f);
p=(int)(p/e);
System.out.println("Product="+p);
}
}
Learn More on Brainly:
Write a program to input the dimensions of a rectangle and find the area of
that square whose perimeter is equal to the perimeter of the rectangle.
https://brainly.in/question/18209875
Write a program to input an integer and remove all the even digits from it
https://brainly.in/question/32408294
Similar questions
Computer Science,
5 months ago
English,
5 months ago
Math,
5 months ago
Math,
10 months ago
Environmental Sciences,
10 months ago