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
How was the addition of an improvement over early web design?
natulia [17]

Answer:

° Webpages could finally incorporate tables into the design.

° Webpage layouts were finally designed using HTML code.

Explanation:

Web design is the structure or styles that are used to make webpages more interactive and attractive for web users to use.

In other to design a web page, on of the tools been used are programming or coding languages.

Examples include, HTML, Cascading Styles(CSS) e.t.c.

The addition of an improvement over early web design resulted in the use of Hyper Text Markup Language(HTML) code to design the layout of webpage.

Hyper Text Markup Language(HTML) is a programming or coding language that is used first in creating and designing a webpage. It gives the webpage, a very good layout and structure.

Also when designing webpages, tables can now be incorporated into the design

5 0
3 years ago
John is runnig his Database application on a single server with 24 Gigabytes of memory and 4 processors. The system is running s
spayn [35]

Answer:

Vertical Scaling

Explanation:

Vertical scaling means the ability to increase the capacity of existing hardware or software by adding resources. In this case, more GB is added (8GB) to the server to address the problem. So vertical scaling is the resultant type john is expecting.

3 0
3 years ago
There are many careers within the IT industry. _____ are responsible for organizing a company's data, making sure all the data i
devlian [24]
C. database administrators are responsible for organizing a company's data making sure all the data is accurate' available' and secure
5 0
3 years ago
25% of 60 min<br> 20% of 60 min<br> 33%% of 60 min
Alexxx [7]
15
12
19.8 cool cool cool
7 0
2 years ago
36 points!!
nataly862011 [7]
It’s A, the law created a right to minimum wage for all workers. Also crates the right for overtime pay and does not allow child labor.
7 0
3 years ago
Read 2 more answers
Other questions:
  • If you are installing separate anti-virus and anti-spyware programs, which should you install first
    7·1 answer
  • What kind of operating system is Windows? Command-line Browser based Graphical user interface Linux-based
    10·2 answers
  • 5255555555555+55555555555555/1111*99442
    14·2 answers
  • What is the most happy job work? that can earn $1000 per day at homes? show company website links
    5·1 answer
  • Which components can be added to a lightning app on custom object (choose 3 answers)A. Visualforce B. Standard Lightning compone
    6·1 answer
  • What is being identified when antibodies stick to pathogens during immunostaining?
    11·1 answer
  • PowerPoint SAM Capstone Project 1 can PLEASE someone do it for me I have some directions like steps and you just have to do it i
    10·2 answers
  • Draw a flowchart diagram for a program that displays numbers 1 to 20
    12·1 answer
  • What search operator would you use with the word "Android" to find Android phone, Android smartphone, and Android cell phone?
    5·1 answer
  • 1.Know the BMI of the user. First, the user will input the height in meters and weight in kilograms. After inputting, the inputt
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!