Answer:
showProduct(int,double)
for example: showProduct(10,10.5) is the correct answer even showProduct(10,10.0) is also correct but showProduct(10.0,10.5) or showProduct(10,10) or showProduct(10.0,10) are wrong calls.
Explanation:
The code is
- <em>public static void showProduct (int num1, double num2){</em>
- <em> int product;</em>
- <em> product = num1*(int)num2;</em>
- <em> System.out.println("The product is "+product);</em>
- <em> }</em>
showProduct is function which asks for two arguments whenever it is called, first one is integer and second one is of type double which is nothing but decimal point numbers. Generally, in programming languages, 10 is treated as integer but 10.0 is treated as decimal point number, but in real life they are same.
If showProduct( 10,10.0) is called the output will be 'The product is 100'.
Strange fact is that, if you enter showProduct(10,10.5) the output will remain same as 'The product is 100'. This happens because in the 3rd line of code,which is <em>product=num1*(int)num2</em>, (int) is placed before num2 which makes num2 as of type integer, which means whatever the value of num2 two is given, numbers after decimal is erased and only the integer part is used there.
This is necessary in JAVA and many other programming languages as you <u>cannot</u><u> multiply two different datatypes</u> (here one is int and another is double). Either both of them should be of type int or both should be of type double.
The answer is A. good luck
Shell programs are computer programs designed to run on the Unix/Linux shell
The shell program where comments are used to explain each line is as follows:
#This gets input for NAME
read NAME
#This gets input for AGE
read AGE
#This gets input for USN
read USN
#This gets input for GENDER
read GENDER
#This prints the name
echo "Name: $NAME"
#This prints the age
echo "Age: AGE"
#This prints the usn
echo "USN: USN"
#This prints the gender
echo "GENDER: $GENDER"
#The following if condition determines, if the user is eligible to vote or not
if [ $USN -gt 50 ] then
echo "You are not eligible"
else
echo "You are eligible"
Read more about computer programs at:
brainly.com/question/13795586
Answer:
The X and Y coordinates of the object's hotspot
Explanation:
MMF2 is simply known in full as Multimedia Fusion 2, and it is a visual programming tool that was developed by the ward winning software development group known as Clickteam. The programing tool which was made after Multimedia Fusion 1.5 allows for the creation of applications and games.
The tool is built in such a way that the X and Y coordinates of the object's hotspot are rightly used to measure the position of an object in the play area.
The Warsaw Pact.
--------------------------