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
mihalych1998 [28]
3 years ago
8

Write a program that inputs numbers and keeps a

Computers and Technology
1 answer:
rjkz [21]3 years ago
3 0

I've included my code in the picture below. Best of luck.

You might be interested in
Write a c++ program to print even numbers from 1 to 20​
Novay_Z [31]

Answer:

#include <bits/stdc++.h>

using namespace std;

// Function to print even numbers

void printEvenNumbers(int N)

{

cout << "Even: ";

for (int i = 1; i <= 2 * N; i++) {

// Numbers that are divisible by 2

if (i % 2 == 0)

cout << i << " ";

}

}

// Function to print odd numbers

void printOddNumbers(int N)

{

cout << "\nOdd: ";

for (int i = 1; i <= 2 * N; i++) {

// Numbers that are not divisible by 2

if (i % 2 != 0)

cout << i << " ";

}

}

// Driver code

int main()

{

int N = 20;

printEvenNumbers(N);

printOddNumbers(N);

return 0;

}

Explanation:

Note: This will find both odd and even numbers, you have to change the number above to the number of your choice

For even numbers

Even number are numbers that are divisible by 2.

To print even numbers from 1 to N, traverse each number from 1.

Check if these numbers are divisible by 2.

If true, print that number.

For odd numbers

Odd number are numbers that are not divisible by 2.

To print Odd numbers from 1 to N, traverse each number from 1.

Check if these numbers are not divisible by 2.

If true, print that number

8 0
3 years ago
Why are computer manufacture constantly releases fast computer and do user benefit from ths speed
creativ13 [48]

Answer:

Companies bring new models out the whole time! It is a competitive market and the companies are constantly trying to make customers buy their products because they are impressed with how they function.

Explanation:

5 0
3 years ago
Brainiest<br><br> What do you think should be done for the people whose jobs become automated?
avanturin [10]

I think those peoples who's jobs are being replaced should be given a new job at the same company, and the new job they get will not be able to be done by a robot.

4 0
3 years ago
Read 2 more answers
Suppose you want to delete an existing file from within Word. What would you do? A. Click on the File button, choose Recent, ope
koban [17]
The asnwer would be A
7 0
3 years ago
What computer would I need to set up my oculus quest 2 aka make my oculus quest 2 link to a computer?
Neko [114]

Answer:

Any computer would do as long as it isn't slow and has a good fps to render the games you plan to connect with. Make sure you have the correct cable though.

5 0
3 years ago
Read 2 more answers
Other questions:
  • In memory ads for DIMMs, you notice DDR 2400 CL15 in one ad and PC4 21300 CL9 in another. Which ad is advertising the faster mem
    12·1 answer
  • Assume that PrecinctReport is a structured type with these fields, address (a string), and three int fields which are counts of
    9·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • ____ is the amount of effort (usually in hours) required to perform cryptanalysis on an encoded message so that it may be decryp
    8·1 answer
  • There are four types of characteristics attributed to a flow: reliability, delay, jitter, and bandwidth. Explain how each of the
    8·1 answer
  • The options are file protection , fault-tolerance , fault line , file tolerance , and the question is which term describes the d
    6·1 answer
  • Ple Choice Worth 5 points)
    11·1 answer
  • The following SQL is which type of join? SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,OR
    15·1 answer
  • Mike logged into a shopping website and entered his username and password. Which protocol will the website use to verify his cre
    15·1 answer
  • A diminished triad can be indicated by
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!