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
Bezzdna [24]
2 years ago
15

Program to count how many even and odd number are in the range from M to N using C++ programming language

Computers and Technology
1 answer:
NemiM [27]2 years ago
8 0

Answer:

#include<stdio.h>

#include <iostream>

using namespace std;

 

int main(){

   int number, min, max;

   cout << "Enter the minimum range: ";

   cin >> min;

  cout << "Enter the maximum range: ";

   cin >> max;

   cout << "Odd numbers in given range are: ";

   for(number = min; number <= max; number++)

        if(number % 2 !=0)

            cout << number<< " ";

   cout<< "Even numbers in given range are: ";

   for(number = min; number <= max; number++)

        if(number % 2 ==0)

            cout << number << " ";

 

   return 0;

}

Explanation:

First of all, we take declare two variables. one as the lowest number of the range and the other as the upper limit of the range (in this case: <em>min</em> and <em>max</em>). We declare another variable (<em>number</em>) and store in it the lowest number of the range (<em>min</em>). To check whether the number currently stored as the value of the variable (<em>number</em>) is even, we take in account the remainder of that number divided by 2. If the remainder does not equals 0, we print that number as odd. We again check the remainder by dividing the number by 2. If the remainder does equals 0, we print that number as even.

You might be interested in
​Lisa mentions that a program is developed to interact with other programs, and she wants to begin by testing the programs indiv
Ronch [10]

QC TESTER(quality testing process) is the name of this process.

To name this process call QC TESTER

<u>Explanation:</u>

Any software development environment their will QC testing (quality testing process) where end user will do or simulate complete testing of software make the software bug free.

After QC tester confirm the program as bug free then only software implementation team ready for implementation process. QC tester is important role in software development environment to find a bug on function, data input entry and monitor result from software and inform to software team with list of bug results.

This process will take place to and from between QC tester and software developer team till software become bug free.  

6 0
3 years ago
Polymorphism means ______________.
Westkost [7]

Answer:

Polymorphism means that a variable of supertype can refer to a subtype object.

Explanation:

For example, in Python programming language, a function that accepts an iterable object uses the concept of polymorphism because that function can accept strings, lists, tuples as arguments.

5 0
3 years ago
Read 2 more answers
Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the selection sort algori
Nadya [2.5K]

Answer:

list =  {10, 18, 24, 75, 70, 20, 60, 35}

Explanation:

Selection is a sorting algorithm that will set a cursor position and search for a minimum number from the list. When the minimum number is found, that minimum number will be swapped with the number in the cursor position. Only one number will be swapped and sorted in one iteration of outer loop. To sort the next number in the following outer loop iteration, the cursor will be moved to the next position and repeat the same search and swapping process as in the first iteration. When finishing all the iterations of outer loop, all numbers shall be sorted in ascending order.

4 0
3 years ago
Within a word processing program, predesigned files that have layout and some page elements already completed are called
dexar [7]

Answer:

I think it's B) templates

     

                   Sorry if it's wrong I'm not sure!!

Explanation:

4 0
3 years ago
Think about what you have learned about work ethic. In a paragraph of no less than 125 words, explain why employers prefer to hi
Zepler [3.9K]

An individual who possesses good work ethic embodies principles like reliability, dependability, dedication to the job, teamwork and cooperation, and a self-disciplined character. Most employers seek a strong work ethic; performance depends on it; satisfaction is derived from it; and it ensures career progression. It is that untouchable effort an employee exemplifies daily, regardless of whether someone is watching or not. A company that has its employees doing exemplary well has everything to do with their performance. Thus, if you have a strong work ethic, you will have qualities that will keep you in demand by huge companies. When you are skilled at the workplace and your colleagues notice and appreciate it, you will have a very deep sense of satisfaction within you. If you put 101 percent, your willingness to work hard will be recognized and will leave you shining brightly than others when the opportunity of promotion knocks.

7 0
3 years ago
Other questions:
  • A Color class has three int color component instance variables: red, green, and blue. Write a toString method for this class. It
    13·1 answer
  • What is a main cause of a virus on a computer
    6·1 answer
  • What type of lights are necessary for silhouettes?
    12·2 answers
  • If you see an icon in a document preset that looks like a tiny web browser window, what type of document is the preset meant to
    13·1 answer
  • Which of these browsers was the first widely adopted?
    12·1 answer
  • Of which of the following devices are point, drag, and click actions?
    15·1 answer
  • Select the statements that are true regarding the future of technology. Select 2 options.
    10·2 answers
  • 1st answer will get brainliest!
    13·2 answers
  • Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no
    6·1 answer
  • Please help me with Excel!!! A lot of points!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!