Search engines - there was no single way to ask a question
Following are the program to calculate even digits sum:
<h3>Program:</h3>
#include <iostream>//header file
using namespace std;
int main()//main method
{
int a[10],s=0,i;//defining an array and an integer variable
cout<<"Enter array values: ";//print message
for(i=0;i<=9;i++)//defining a loop that input array value
{
cin>>a[i];//input array value
}
for(int i=0;i<=9;i++)//defining loop that check array value
{
if(a[i]%2==0)//defining if block that checks even number condition value
{
s=s+a[i];//adding even number value
}
}
cout<<"The sum of even number is: "<<s;//print even number sum value
return 0;
}
Program Explanation:
- Defining a header file.
- Defining the main method.
- Inside the main method, an integer array "a", and two integer variable "s,i" is declared.
- In the next step, a for loop is declared that input the array value, and after input value another loop is declared that check even number value in array.
- In this loop it adds array value and after adding the value a print method is declared that prints its value.
Output:
Please find the attached file.
Find out more information about the even number here:
brainly.com/question/4184435
In this question, when Lilyana write a program to calculate the area, <em><u>she forgot to call the method</u></em> that's why it will not give any output. so, complete code with the output can be defined as follows:
Program Explanation:
- Defining a method "area" that takes two variables "length, height" in the parameters.
- Inside the method, a variable "area" is declared that calculates the area by multiplies "length and width".
- After calculating the area a return keyword is used that returns its value.
- Outside the method, a print method is declared that calls the area method by accepting value into its parameters.
Program:
def area(length, height):#defining a method area that takes two parameters "length, height"
area = length * height#defining a variable area that calculates the area by multiplies length and width
return area#using return keyword that returns area value
print(area(6,8))#using a print method that calls area method by accepting the value
Output:
Please find the attached file.
Learn more:
brainly.com/question/8908120
Answer:
Nonexclusive forwarding
Explanation:
In Nonexclusive forwarding, DNS forwarding is setup so that if the DNS server receiving the forwarded request cannot resolve the name, then the server that originally forwarded the request makes an attempt to resolves it. If that fails, the server sends a request to its designated forwarder.
Answer:
Client, Server
Explanation:
The web browser acts as a client while the university computer acts as a server.
In a Server-Client model or architecture, the server provide the resources while the client request for the resources.
In this case, the university computer provide the resources that is to be consumed by the web browser after it must have made some request. The resources provided by the server (university computer) is based on the client (web browser) request.