1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yan [13]
2 years ago
7

WAP to enter a multidigit number and find the sum of only even digits in a number.​

Computers and Technology
1 answer:
daser333 [38]2 years ago
6 0

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

You might be interested in
A cell's address, its position in the workbook, is referred to as a ________________ when it is used in a formula.
Inga [223]

Answer:

A cell's address, its position in the workbook, is referred to as a <u>cell reference</u>  when it is used in a formula.

5 0
2 years ago
Discuss the software development methodology you would use for developing a software product for insurance agents, and state val
nadya68 [22]

Answer:

It depends on what the company will be willing to use and it also depends on their budget

Explanation:

4 0
3 years ago
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a
ira [324]

Answer:

hope this helps

Explanation:

7 0
3 years ago
A_________ formal access control methodology used to assign a level of confidentiality to an information asset and thus restrict
Illusion [34]

Answer:

1. Data classification scheme

Explanation:

<h2><u>Choose an answer from the options. </u></h2>

A<u> data classification scheme</u> formal access control methodology used to assign a level of confidentiality to an information asset and thus restrict the number of people who can access it

6 0
4 years ago
Do this pls and i will give you 25 blls
saveliy_v [14]

Answer:

√A*BCD-DC(B-A)*BA(CD)

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • How to tell if screen or screen protector is cracked?
    5·2 answers
  • Which option enables you to keep the last grammatical change
    15·2 answers
  • This formatting option functions like a space bar. However, instead of moving one space at a time, it allows you to move your te
    6·1 answer
  • "someone has tampered with your computer and erased data". what kind of computer threat is this
    11·1 answer
  • For this exercise, you are given a phrase. Return the number of time the word “dog” appears in the phrase.
    7·1 answer
  • In c++ when you create a class and you don't want to put the class and the main program in one source file and let's say you cre
    14·1 answer
  • When a CPU executes each instruction in a program, it uses a process known as the __________.
    15·1 answer
  • Which picture should i put as my profile picture.
    15·2 answers
  • After turning volume all the way up on your computer speaker you still can’t hear any sound. What should be done next
    15·1 answer
  • Hi. I'm a beginner in python. Can anyone tell me what I'm missing or doing wrong, because I can't figure out why my messages in
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!