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
In which phase of website design does the designer create a mock-up aimed at the target use
alexdok [17]

Answer:

The answer is design.

Explanation:

I know this because based off the notes it states that "the designer can use a model or mock-up to illustrate the look and feel, to help gain a better understanding of the necessary elements and structures.

3 0
2 years ago
What feature did the 32X add to the Sega Genesis?
il63 [147K]

Answer:

ngl why would i know this

Explanation:

5 0
3 years ago
a 0.600 kg dynamics trolley has 1.5 kg load added. It is launched with a force of 10.n what is the acceleration
Anastaziya [24]

Answer:

acceleration = 4.76 m/s²

Explanation:

Given that"

the mass of the dynamic trolley = 0.6 kg

the mass of the load  = 1.5 kg

total mass = (0.6 + 1.5) kg = 2.1 kg

the force = 10 N

Thus;

using the formula of force which is;

Force = mass × acceleration

10 = 2.1  × acceleration

acceleration = 10/2.1

acceleration = 4.76 m/s²

7 0
2 years ago
32.
qaws [65]

Answer:

a

Explanation:

hackers access your system unauthorized

5 0
3 years ago
Identify two areas of science or technology that make your life easier, safer, or otherwise better than your grandparents lives
vladimir2022 [97]
Heres some:

Quantum computing
Machine Learning
Medicine
Aeronautical Engineering (Drones, better transportation)
8 0
3 years ago
Other questions:
  • Which of the following are common problems experienced with software applications?
    15·1 answer
  • Survey Q. Non-scoring: What role is played in the team? (1 correct answer)
    14·1 answer
  • Which of these is not one of the main parts of an email
    9·1 answer
  • How is this fictional tex in the people could fly different from the nonfictional text​
    12·2 answers
  • Consider the following schema for customer: (id, name, street, city, state, zip, phone), in which customers are uniquely determi
    10·1 answer
  • Based on a Supreme Court ruling, an Internet-based merchant needs to charge sales tax only when _____.
    9·1 answer
  • What is the purpose of application software
    12·1 answer
  • You receive an email that appears to legitimately be from your Bank. The email indicates the need for verification of your infor
    15·2 answers
  • Choose the best answer from the options below to complete the following sentence.
    15·1 answer
  • What is a possible weakness of an expert-novice pair?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!