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]
1 year 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]1 year 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
How do I mark someone brainiest
svet-max [94.6K]

Answer:

when someone answers your questio correctly, you will see a red crown. Click on that and mark them the most brainiest

Explanation:

3 0
2 years ago
Read 2 more answers
Select the correct answer.
Nady [450]

Answer:

B

Explanation:

In an ERD, the Crow Foot Notation Symbols are used with cardinality.

Hope it helps you

3 0
2 years ago
DDL statement for adding a column to an existing table is
vaieri [72.5K]

Answer:to add a column to existing table.

to rename any existing column.

to change datatype of any column or to modify its size.

to drop a column from the table.

Explanation:

hope this help

4 0
2 years ago
In 1981, Ian Murphy broke into the AT&amp;T online computer system and changed their clocks, allowing people to make calls durin
poizon [28]
A. intentionally or recklessly disrupt, degrade, or destroy information or services on the computer
5 0
2 years ago
Many people dream of being successful, but their actions can sometimes hold them back. What are some ways you can be sure that y
Nikitich [7]

Answer:

  • make a promise
  • write it in a diary
  • make a scrap book
  • create a video
  • make a picture book

I hope this helps

<h2>I know you will do great!!!</h2>

5 0
2 years ago
Other questions:
  • A company ABC asked you to design a simple payroll program that calculates and employee's weekly gross pay, including any overti
    9·1 answer
  • Plz answer these questions...those who give answer get the brainliest......hurry up..!!!​
    14·1 answer
  • Due to the difficult economic times, increased global competition, demand for customization, and increased consumer sophisticati
    9·1 answer
  • What tasks do most operating systems perform?
    15·1 answer
  • What are the main types of reading tools? Check all that apply. please HELP​
    15·1 answer
  • All of the following are characteristics of a 4 year college except
    11·2 answers
  • Here is a nested loop example that graphically depicts an integer's magnitude by using asterisks, creating what is commonly call
    7·1 answer
  • Aranjează următoarele cuvinte din documentul word Proiect, într-o scrisoare în care soliciți directorului școlii sprijin în priv
    8·1 answer
  • Meats ages hair and feathers all contain this monomer
    13·1 answer
  • Create One print command in LOGO​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!