Answer:
Following are the error in the given program are explain in the explanation part .
Explanation:
The main() function call the function getMileage() function after that the control moves to the getMileage() definition of function. In this firstly declared the "mileage" variable after that it taking the input and module is finished we see that the "mileage" variable is local variable i,e it is declared inside the " Module getMileage() " and we prints in the main module that are not possible to correct these we used two technique.
Technique 1: Declared the mileage variable as the global variable that is accessible anywhere in the program.
Technique 2: We print the value of "mileage" inside the Module getMileage() in the program .
Answer: D.) LEFT
Explanation: LEFT is an excel function allows users to extract a specified number of characters starting from the left. The syntax goes thus :
=LEFT(text, [num_chars])
text: the original string in which characters are to be extracted.
num_chars : takes an integer, stating the number of characters to extract.
The proper function is also an excel function which sets the first character in each word to uppercase. The mid function is also used in text extraction starting from any position in the original string based on what is specified.
The LEN function is used to get the number or length of characters in a string.
Answer:
The answer to this question an be given as:
The other thing which can be purchased with your $50.
Explanation:
In the question the opportunity cost is "The other thing which can be purchased with your $50". Because you have only $ 50 as a birthday gift and you want to choose to buy new wallpaper for your room.If you buy only the wallpaper so you can't buy any other item. To solve this problem you should buy other item. It may be any thing you want. So the answer to this question is "The other thing which can be purchased with your $50".
Answer:
anycast
Explanation:
Anycast -
It refers to as the routing methodology and the networking address where only one destination address has more than two pathway for the end destination , is referred to as an anycast .
In this case , the router has the capability to select the pathway to reach the destination , depending on the latency measurement , cost , distance and hops .
Hence , from the given information of the question ,
The correct answer is anycast .
Answer:
public static void dashedLinses(int num){
if(num>0){
for(int i=1; i<=num; i++){
System.out.print("-");
}
System.out.println();
}
}
}
Explanation:
- The function is written with Java programming language
- As required by the question, it accepts an int parameter and returns nothing.
- An if statement is used to check the condition of n greater than 0
- Using a for loop, it outputs a line whose length is determined by the value of the parameter
- A complete code with the main method is given below
<em>public class num9 {</em>
<em> public static void main(String[] args) {</em>
<em> int num= 2;</em>
<em> dashedLinses(num);</em>
<em> }</em>
<em> public static void dashedLinses(int num){</em>
<em> if(num>0){</em>
<em> for(int i=1; i<=num; i++){</em>
<em> System.out.print("-");</em>
<em> }</em>
<em> System.out.println();</em>
<em> }</em>
<em> }</em>
<em>}</em>