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
Nonverbal messages from the movie it​
RUDIKE [14]

Answer:

ya you say right

Explanation:

5 0
4 years ago
Read 2 more answers
This is the most flexible way to create a query. Used to create queries that displays only the records that match criteria enter
Pachacha [2.7K]

Answer:

Query Wizard

Explanation:

We can use the Query Wizard to automatically create a selection query, but in this case, we have less control in our details of the query design, it's the fastest way to create a query, even detect some design errors.

Steps to use the Query Wizard

1) In the Queries group on the Create, click Query Wizard

2) Add fields

3) On the last page of the wizard, add a title to the query

6 0
3 years ago
Which line in the following program will cause a compiler error?
Viktor [21]

Answer:

The answer is "Option A".

Explanation:  

  • In the given C++ Language program on line 8 compile-time error will occur, because in the code the conditional statement is used. In if block, we check two conditions together, which is the number variable value is greater than equal to 0 and check less than equal to 100.  
  • In this condition statement, a AND operator is used that execute when both condition is true, but in the last condition, we do not define a variable name that, checks value. That's why the program will give an error on line 8.
3 0
3 years ago
Is the adoption rate of communication technology increasing ?
Neko [114]
More people adopt the technology during any period, leading to an increasing rate of adoption. So, yes
3 0
4 years ago
Read 2 more answers
In the context of computer crimes, those who attempt to destroy the infrastructure components of governments and financial insti
elixir [45]

In the context of computer crimes, those who attempt to destroy the infrastructure components of governments and financial institutions are known as <u>d. cyber terrorists</u>.

<u>Explanation</u>:

Cyber crime means crime committed with the help of computer and internet. Cyber terrorism means crime that causes damage to infrastructure components of financial institutions and government office and causes threat to the society.

Cyber terrorists are person who involve in cyber terrorism. The systems used in the governments and financial institutions should be protected with hardware and software to avoid cyber terrorism.

This kind of cyber terrorism is very dangerous, as they hack the system and destroy the valuable information stored in it.

5 0
3 years ago
Other questions:
  • The PICC team is scheduled to remove a PICC before client discharge. Assessment of the catheter indicates the PICC and determine
    7·1 answer
  • Which format is best for the image below?
    12·1 answer
  • A(n) ________ CPU has two processing paths, allowing it to process more than one instruction at a time.
    9·2 answers
  • What cannot be performed using windows task manager
    10·1 answer
  • ERP implementation probably will not require:
    8·2 answers
  • You suspect a component in a computer is fried. You remove any unnecessary hardware devices one by one to narrow down where the
    7·1 answer
  • Which of the following is not part of the four ways you can avoid problems with email communication?
    12·1 answer
  • Write a technical term for following statements
    15·1 answer
  • What is NOT a built-in function in python?<br> sqrt()<br> string()<br> fabs()<br> O print()
    12·2 answers
  • What is the vibrating or buzzing of a hand controller known as?.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!