If the default gateway is connected to the internet, the type of internet access that the server would have is:
<h3>What is a Default Gateway?</h3>
A default gateway is a functionality in a computer system that allows access or communication with other networks.
It is the primary channel of interaction with other networks. Once this default gateway is connected to the internet, it will be given full access.
Learn more about the default gateway here:
brainly.com/question/2692918
#SPJ11
Answer:
Complete the main method as follows:
int num;
cin>>num;
int i = 0;
while(num!=0){
array[i] = num;
cin>>num;
i++;
}
Complete the printArray function as follows:
void printArray(int array[]){
int i =0;
while(array[i]!=0){
cout<<array[i]<<" ";
i++;
}}
Explanation:
<u>Main method</u>
This declares a variable that gets input from the user
int num;
This gets input from the user
cin>>num;
This initializes a count variable to 0. It represents the index of the current array element
int i = 0;
while(num!=0){
This inserts the inputted number to the array
array[i] = num;
This gets another input
cin>>num;
The counter is incremented by 1
i++;
}
The above loop is repeated until the users enters 0
<u>printArray method</u>
This declares the array
void printArray(int array[]){
This initializes a counter variable to 0
int i =0;
This is repeated until array element is 0
while(array[i]!=0){
Print array element
cout<<array[i]<<" ";
Increase counter by 1
i++;
}}
<em>See attachment for complete program</em>
Code:
Here is the code. Also screenshot of the code and text file containing the code have been attached here.
This code has been written in Python 3.0
# getting input
lst = [ ]
n = 5
for i in range(0, n):
ele = int(input())
lst.append(ele)
print(lst)
# getting odd numbers and even numbers from list and compute average
odd_sum = 0
even_sum = 0
odd = 0
even = 0
for i in range(0, n):
if lst[i] % 2 == 0:
even_sum = even_sum + lst[i]
even = even + 1
elif lst[i] % 2 > 0:
odd_sum = odd_sum + lst[i]
odd = odd + 1
odd_avg = odd_sum/odd
even_avg = even_sum/even
print("there were",odd,"odd numbers in input")
print("there were",even,"odd numbers in input")
print("average of odd numbers in the list",odd_avg)
print("average of even numbers in the list",even_avg)
The answer is (c) infinite loop
I can't get what do you need, but I guess it's a part of java code. I can explain what it means. It's used to unite two rising sorted arrays which are list1 and list2. The result is stored in result array. I suggest you to clearly explain your task as it's difficult to give you correct answer.