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
frosja888 [35]
3 years ago
8

Write an application that asks a user to type an even number or the sentinel value 999 to stop. When the user types an even numb

er, display the message "Good job!" and then ask for another input. When the user types an odd number, display an error message, "x is not an even number", and then ask for another input. When the user types the sentinel value 999, end the program
Computers and Technology
2 answers:
Alisiya [41]3 years ago
6 0

Answer:

int value;

while(1){

scanf("%d\n", &value);

if(value == 999)

break;

if(value%2 == 0)

printf("Good job");

else if(value%2 == 1)

printf("%d is not an even number", value);

}

Explanation:

I am going to write a C code for this.

The while(1) runs until the break command. So

int value;

while(1){

scanf("%d\n", &value);

if(value == 999)

break;

if(value%2 == 0)

printf("Good job");

else if(value%2 == 1)

printf("%d is not an even number", value);

}

yan [13]3 years ago
3 0

Answer:

 do{

    std::cout << "input an even number: ";

    std::cin >> n;

    even=n%2;

    if (even==0)

    std::cout << "Good job!\n";

    else

    std::cout << n <<" is not an even number\n";

    }while(n!=999);

Explanation:

#include <iostream>

#include <string>

int main()

{ int n=0,even;

 do{

    std::cout << "input an even number: ";  //print on screen to input the number

    std::cin >> n;  //put that value on n variable

    even=n%2;

    if (even==0)  //if even is zero the number is even

    std::cout << "Good job!\n";

    else  //if even is not zero the number is odd

    std::cout << n <<" is not an even number\n";

    }while(n!=999);  // we will repeat the proccess while n is diffrente from 999

}

You might be interested in
Complete the following sentences with the correct form of the verbs in brackets.
Rina8888 [55]

Answer:

1. don't pass, will be

2. will get, eat

3. don't help, won't help

4. are meeting, will you go?

5. will stay, rains

Is

6.Will

Puts on

7.Will go

Asks

8.Will... tell

9.Tell

Will

10.Go... Will find out...

Explanation:

5 0
2 years ago
There exists a data type Date with member function Increment that increments the current Date object by one. The ++ operator is
nalin [4]

Answer:

Date Date::operator++( int )

{

Date temp = *this;

Increment();

return temp;

}

Explanation:

Of options 1 through 4, only option 4 correctly implement the post increment of the ++ operator.

Interpreting each line of option for and comparing it to other options

Line 1: Date Date::operator++( int )

This declares the data type and its ++ operator

This is same for all options

Line 2: The Date type needs to be declared

In option 4, it was declared correctly as Date temp = *this;  using a pointer variable *this.

Here, option 2 is removed from the list of possible options.

Comparing other options

Line 3: The member increment option needs to be declared after the declaration of the date type variable.

This is correctly declared as Increment();  in option 4

Here, option 3 is removed from the list of possible options.

Comparing other options

Line 4: The value declared variable temp needs to be returned the way it was declared (without pointer indicator)

Hence, option 4 is best appropriate

3 0
3 years ago
Which type of data is most sensitive and should be protected from malware?
Dennis_Churaev [7]
The correct answer is “C. The credit card number that you use to make an online purchase”
5 0
1 year ago
_____ allow you to logically separate ports in switches to create subdomains without wiring your network as physical subdomains.
AlladinOne [14]

Answer:

The correct answer for the following question is VLAN.

Explanation:

It stands for Virtue Logical Area Network which allows you to group port on a switch logically. VLANs can be extend across (a period of time) multiple switches means you used to express on port that you're in that VLAN by changing the VLAN number.

We have the ability to improve our security with VLANs by controlling what VLAN is accessing with the other network of VLANs. So that this network is particularly helpful in office situation to create subdomain without wiring physical domain as your network.

6 0
2 years ago
A network administrator has asked robin, a network engineer, to use ospf (open shortest path first) along with rip (routing info
Contact [7]

The option that can be used to  identify and analyze which characteristic of OSPF signifies this is known to be Low overhead, fast convergence.

<h3>What is OSPF about?</h3>

The OSPF is known to be called an open Shortest Path First protocol.

It belongs to the family of IP Routing protocols as it serves as  Interior Gateway Protocol (IGP) used mainly for the Internet, and the option that can be used to  identify and analyze which characteristic of OSPF signifies this is known to be Low overhead, fast convergence.

See full question below

A network administrator has asked Robin, a network engineer, to use OSPF (Open Shortest Path First) along with RIP (Routing Information Protocol) on an edge router in a network so that it demands more memory and CPU power for calculations but keeps network bandwidth to a minimum with a very fast convergence time. Identify and analyze which characteristic of OSPF signifies this.

Shared data

Low overhead, fast convergence

Stability

Multi-vendor routers

Learn more about OSPF  from

brainly.com/question/14604232

#SPJ1

8 0
1 year ago
Other questions:
  • Cleo finds herself frequently searching for messages from particular senders or with specific subjects. What should she create
    5·1 answer
  • Based on the current economic situation do you expect the employment demand for graduating engineers to increase or decrease? Ex
    9·1 answer
  • What would happen to a eukaryotic cell if all its mitochondriawere destroyed
    7·1 answer
  • When did the digital revolution begin
    10·1 answer
  • Write a method called all Less that accepts two arrays of integers and returns true if each element in the first array is less t
    12·1 answer
  • Is instant messaging a form of synchronous communication
    10·1 answer
  • There is an application which inputs hundred numbers from the user, if user enters a positive number it increments valid numbers
    6·1 answer
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • What is the correct order of the phases of the software development process?
    14·1 answer
  • Future Cell Tech, a company that produces cell phones, is always on top of the newest technology and is the leader in cell phone
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!