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
Which of the following is a hand-drawn animation that takes a large amount of time to complete?
elixir [45]

Answer:

Where are the choices?

Thanks for adding the choices at the comment secion

  1. 2D animation
  2. 3D animation
  3. Stop Motion  
  4. Celluloid animation

A- Celluloid Animation

4 0
3 years ago
Write c program to check character is alphabate or not?​
Elan Coil [88]

Lookup the isalpha() function in the C standard library, this function will check and return non-zero for alphabetic characters.

8 0
3 years ago
Wite 3 names of computers used in 1st generation of computers?
enyata [817]
Here are some of the computers used in the first generation of computers:
ENIAC
EDVAC
UNIVAC
IBM-701
IBM-650
These are some of the first computers ever that led to today's computers.
5 0
3 years ago
Prepare a document to list down at least 10 features/operations (on process and thread) you can do using Process Explorer.
leonid [27]

Answer:

The operations that can be carried out using process explorer include but are not limited to:

Explanation:

  1. Killing a Process Tree
  2. Ending or terminating a process
  3. Suspending a process
  4. Examining which process has locked a file
  5. Manually detecting a virus
  6. Unhiding a process. This can help to callup the window for a process that is not visible under normal explorer activities
  7. Monitor CPU usage
  8. setting the priority of a process
  9. changing a service process's access security
  10. Monitoring Graphics Processing Unit

Cheers

6 0
3 years ago
What is a full featured word processing program that allows you to create many types of personal and business document.
miskamm [114]
B) Word is the answer
3 0
3 years ago
Other questions:
  • Interpretations of​ Moore's law assert​ that:
    13·1 answer
  • Calculated fields can be entered in queries. What row should you type a calculated field in?
    13·1 answer
  • Help! live preview in brackets is not working
    8·1 answer
  • Prove each statement using a proof by exhaustion. For every integer n such that 0 lessthanorequalto n &lt; 3, (n + 1)^2 &gt; n^3
    9·1 answer
  • Choose two browsers and compare their security features.
    5·1 answer
  • Seth is considering advertising his business using paid search results.What do you think makes paid search advertising so effect
    11·2 answers
  • A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, A3 contains 7. You enter in cell A4 the followi
    8·1 answer
  • All of the following are aspects of the search process except?
    6·2 answers
  • What is the maximum number of WildFire® appliances that can be grouped in to a WildFire® appliance cluster?
    7·1 answer
  • Expain the application areas of ICT in education sector and E-commerce​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!