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
Dafna11 [192]
3 years ago
6

Write a function which the counts the number of odd numbers and even numbers currently in the stack and prints the results.

Computers and Technology
1 answer:
Lerok [7]3 years ago
5 0

Answer:

See the code below and the algorithm explanation on the figure.

Explanation:

The explanation in order to get the answer is given on the figure below.

Solving this problem with C. The program is given below:

#include <stdio.h>

int main(void) {

   int n, Even=0, Odd=0, Zeros=0;  

   for (;;) {

       printf("\nEnter the value the value that you want to check(remember just integers): ");

       //IF we input a non-numeric character the code end;

       if (scanf("%d", &n) != 1) break;

       if (n == 0) {

           Zeros++;

       }

       else {

           if (n % 2) {

               Even++;

           }

           else {

               Odd++;

           }

       }

   }  

   printf("for this case we have %d even, %d odd, and %d zero values.", Even, Odd, Zeros);

   return 0;

}

You might be interested in
Mavis is considering signing up for a hosted enterprise software solution for her small business. She recognizes that an advanta
babymother [125]

Since Mavis is considering signing up for a hosted enterprise software solution for her small business, an advantage of the software is <u>lower cost</u>.

A hosted enterprise software solution is typically hosted off-site and in a private server that is owned by a third party. It's vital for organizations as it can be used in managing daily business activities.

The advantages of a hosted software model include reliable backup, reduction in IT costs, scalability of computing resources, etc. It is also necessary for managing critical business processes.

Read related link on:

brainly.com/question/25526416

6 0
2 years ago
An attribute whose value uniquely identifies an object is called a(n) _______.​
Juliette [100K]
This is called a key attribute!

There are different types of key attributes!

Primary key is the key that is actually chosen, for example a social security number. 

There is also a unique key, say our finger prints! they also uniquely identify humans, but usually we prefer to use social security number when we list people (a unique key could be a primary key if we chose so)

We could also identify people by their social security number and a name, but this is unnecessary, as social security number already gives a full identification. Such a reduntant key is called super key. 
6 0
3 years ago
Adrian wants to run a digital movie clip that his friend shared with him through email. His system has 2 GB of RAM and 20 GB of
bogdanovich [222]

Answer:

Adrian requires a high speed internet connection and a codec player to download and run movie on his system.

Explanation:

There are some basic requirements of the computers that, can be used to watch the movie on the computer.

1. RAM

2. Storage space to store the movie

3. High Speed Internet: As the movie is on the internet, to download it from internet, bandwidth and speed of internet is required.

4. Video Codec Player is required to play a digital movie on laptop or system.

3 0
2 years ago
5.
garri49 [273]

<em>The answer is : It highlights the contrast between the Dursley's excitement for the dinner and Harry's loneliness. </em>

<em> </em>

<em>Harry is a lonely boy as he must remain outcast and invisible to Dursley's visitors. During this time, Dursleys are expecting some visitors which has relation to Vernon's job. Harry must stay in the bedroom so the visitors won't see him and won't ask some things about him. Since they are having a visitor, a dinner must be served to make the visit worthwhile which is what the Dursleys are looking forward to. </em>

4 0
3 years ago
What is one disadvantage people face without a checking account?
sveticcg [70]

Answer:

If they have a job that only pays with ckecks they won't be able to have their paycheck.

Explanation:

8 0
3 years ago
Other questions:
  • Which organization publishes a handbook that describes various occupations?
    12·1 answer
  • These systems consist of interlinked knowledge resources, databases, human experts, and artificial knowledge agents that collect
    9·1 answer
  • on average, someone with a bachelor’s degree is estimated to earn _______ times more than someone with a high school diploma
    13·1 answer
  • Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished
    14·2 answers
  • __________ was awarded the Nobel Prize in physics forhis work on the photoelectric effect.
    13·1 answer
  • write a script that creates and calls a stored procedure named insert_category. first, code a statement that creates a procedure
    10·1 answer
  • When backing up a database, what is added to the file name?<br> On g metrix
    9·1 answer
  • Divide 111001 by 1101​
    7·1 answer
  • At which track meet did two runners finish in a time equivalent to the mode?
    14·1 answer
  • Help me guys plssssss​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!