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
Which of the following best describes Roblox?
liberstina [14]

Answer:

B. An online platform for game creation!

Explanation:

Roblox is a massively multiplayer online and game creation system platform that allows users to design their own games and play a wide variety of different types of games created by other users.

--

Hope this helps! ✧.·:

6 0
3 years ago
Read 2 more answers
Sendstars is a package delivering company that recently made a study on its customer retention and service renewal metrics. They
masya89 [10]

Answer: C. Cause and Effect Modelling.

Explanation:

Data Mining is a technique which aims at obtaining important and useful information in a stockpile of data. This in turn would prove useful in making predictions. It would also inform present decisions.

The Cause and Effect modelling approach explains that for every given action ( effect ), there was a prompting factor ( cause ).

In the case of Sendstars Company, the downward spiral in customer retention was as a result of ill -mannered staff. This effect, prompted the decision to have the employees trained on customer service.

3 0
4 years ago
Read 2 more answers
Fryshta is using the Help window in PowerPoint to learn about inserting Smart Shapes into a presentation. She currently has a He
Rainbow [258]

Answer: Pin

Explanation:

Pin button is the button that is used for sticking or saving the ideas from the windows or web on that very place.This feature helps in reviewing or getting the idea back later anytime from the window as per users need. User use this button for saving any food recipe, steps of any process, guidelines etc.

  • According to the question, Fryshta can use pin button from the help window for sticking or pinning the steps of inserting shapes in her presentation.She can have a look at the steps whenever she want.
8 0
3 years ago
What is IBM compadibles
mixer [17]

Answer:

IBM PC compatible computers are computers similar to the original IBM PC, XT, and AT that are able to use the same software and expansion cards. Such computers were referred to as PC clones, or IBM clones

8 0
4 years ago
Jenny wants to create a network that can be accessed from any room in her house without physically connecting. Which type of net
CaHeK987 [17]

Answer:

D. Wireless

Explanation:

Jenny should opt for the wireless method out of all choices. This is be cause wireless network enables the user to access and use the network from anywhere in radius to the network without a physical connection.

6 0
2 years ago
Other questions:
  • End-user development: the process by which an organization's non-it specialists create software applications.
    8·1 answer
  • convert the following c code to mips. assume the address of base array is associated with $s0, n is associated with $s1, positio
    14·1 answer
  • What arw two reasons for maintaning your privacy on the internet
    11·2 answers
  • Recursion is a natural use for a _____ (stack or queue)
    13·1 answer
  • How many of the colonists of Jamestown died before they made it to shore, due to the difficult voyage?
    15·1 answer
  • Ineeedd help please 35 points question
    5·1 answer
  • Complete the implementation of the following methods:__init__hasNext()next()getFirstToken()getNextToken()nextChar()skipWhiteSpac
    11·1 answer
  • Why do you think that network and telecommunications security careers are some of the fastest growing in the field of technology
    8·1 answer
  • I’ll give brainliest if answers are correct
    11·1 answer
  • True or False
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!