Answer:
The output is :
5
6
7
Explanation:
Given
The above lines of code
Required
What is the program output
The above code is python
This line implies that n has range of values from 0 to 2
for num in range(3):
This adds 5 to num and prints the result
print (num + 5)
So, when num = 0; 5 is printed because 0 + 5 = 5
So, when num = 1; 6 is printed because 1 + 5 = 6
So, when num = 2; 7 is printed because 2 + 5 = 7
Hence, the output is
5
6
7
<em>With each number printed on a separate line</em>
Answer:
import java.util.Scanner;
public class CocaColaVendingTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter the total number of calls received");
int callsReceived = input.nextInt();
System.out.println("Enter the total number of operators");
int operatorsOnCall = input.nextInt();
int callsPerOperator = callsReceived/operatorsOnCall;
System.out.println("The number of calls per operator is "+callsPerOperator);
}
}
Explanation:
A complete Java code is given above. The user is prompted to enter the values for the number of calls received and the number of operators. These are stored in the respective variables.
Using an Integer division, the number of calls per operator is obtained by: callsPerOperator = callsReceived/operatorsOnCall;
B- You can adjust the mouse's double-click speed.
Some computer mouse software (depends on brand) will allow you to set new tasks for the mouse to perform. Sometimes there are mice that have extra buttons that can be programmed to do certain tasks.
Answer:
Following are the program in the C++ Programming Language.
//set header file or namespace
#include <iostream>
using namespace std;
//define main function
int main() {
//set integer type array with indexing 10
int a[10];
//set integer type variable to 1
int i=1;
//set element in 1st index
a[0]=17;
//set element in last index
a[9]=29;
//set while loop for the remaining elements
while(i<9)
{
//set -1 in the remaining elements
a[i]=-1;
i++;
}
//set for loop to print array
for ( int j = 0; j < 10; j++ ) {
cout << a[j]<<endl;
}
}
<u>Output:</u>
17
-1
-1
-1
-1
-1
-1
-1
-1
29
Explanation:
In the following program, we define the main function "main()" and inside it.
- Set an integer type array element "a[]" with index value 10.
- Set integer data type variable "i" initialize to 1.
- Set elements in the first and last place in the array.
- Set the while loop to initialize elements for the remaining place.
- Set the for loop to print the array elements.
Answer:
a. 227 , b. 74 , c. 249
Explanation:
a. 0x E3 = 227
Hexadecimal Digit E corresponds to decimal number 14.
So decimal representation = 14 * 16 + 3 = 224 + 3 = 227
b. 0x 4A = 74
Hexadecimal Digit A corresponds to decimal number 10.
So decimal representation = 4 * 16 + 10 = 74
c. 0x F9 =
Hexadecimal Digit F corresponds to decimal number 15.
So decimal representation = 15 * 16 + 9 = 240 + 9 = 249