Answer:
i think its the third one, i hope this helps
Explanation:
Scanner.
<em> </em>A <em>scanner</em> is an input device that scans documents such as photographs and pages of text, when a document is scanned, it is converted into a digital format.
Here's the official definition:
It is generally a long or extreme-long shot<span> at the beginning of a scene indicating where, and sometimes when, the remainder of the scene takes place. </span>Establishing<span> shots were more common during the classical era of filmmaking than they are now.</span>
Answer:
The solution code is written in Python
- numList = [10, 20, 30, 40]
-
- for i in range(0, len(numList) - 1):
- numList[i] = numList[i] + numList[i + 1]
-
- print(numList)
Explanation:
Firstly, create a sample number list, numList (Line 1)
Create a for-loop that will traverse through the array element from 0 till the second last of the element (len(numList) - 1) (Line 3)
Set the current element, numList[i], to the sum of the current element, numList[i] and the next element, numList[i+1]
Print the modified numList (Line 6) and we can see the output as follows:
[30, 50, 70, 40]
import java.util.Scanner;
public class JavaExample {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.print("Enter the first number: ");
double num1 = scan.nextDouble();
System.out.print("Enter the second number: ");
double num2 = scan.nextDouble();
System.out.print("Enter the third number: ");
double num3 = scan.nextDouble();
scan.close();
System.out.print("The average of entered numbers is:" + avr(num1, num2, num3) );
}
public static double avr(double a, double b, double c)
{
return (a + b + c) / 3;
}
}
<em>The </em><em>output </em><em>is </em><em>attached </em><em>to </em><em>the </em><em>answer. </em><em> </em><em>You </em><em>can </em><em>also </em><em>check </em><em>it.</em><em>. </em>