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
marissa [1.9K]
3 years ago
10

Write an app that reads an integer, then determines and displays whether the integer is odd or even. [Hint: Use the remainder op

erator. An even number is a multiple of 2. Any multiple of 2 leaves a remainder of 0 when divided by 2.]
Computers and Technology
1 answer:
Sholpan [36]3 years ago
8 0

Answer:

#include <stdio.h>// header file

int main() // main function definition

{

   int number; // variable declaration

   scanf("%d",&number); // user input for number

   if(number%2==0) // check the number to even.

   printf("Number is a even number"); // print the message for true value

   else

   printf("Number is a odd number"); // print the message for false value.

   return 0; // return statement.

}

Output:

  • If the user inputs is 2 then the output is "Number is a even number".
  • If the user inputs is 3 then the output is "Number is a odd number".

Explanation:

  • The above program is to check the even and odd number.
  • The first line of the program is used to include the header file which helps to understand the functions used in the program.
  • Then there is the main function that starts the execution of the program.
  • Then there is a variable declaration of number which is declared as an integer which takes the integer value because the program needs the integer only.
  • Then the scanf function is used to take the inputs from the user.
  • Then the if condition check that the number is divisible by 2 or not.
  • If it is divisible print "even number" otherwise print "odd-number".
You might be interested in
Which installation changes from the old information system to the new one incrementally, starting with one or a few functional c
Wewaii [24]

Answer:

Phased installation

Explanation:

The name of this strategy is phased installation. Phased installation (or phased implementation) occurs when an existing system is replaced by a new one. However, unlike most implementations, this takes place in stages. This has several advantages. First, it allows you to test the system. If there is a problem with it, it is easier to revert back to the old strategy. Moreover, if employees need to adopt this new system, it allows them to get used to it slowly while still being able to access the previous one.

5 0
3 years ago
Write a Java program to accept an item's name and price from the user and output them to the console
Anit [1.1K]

Answer:

// program in java.

// package

import java.util.*;

// class definition

class Main

{// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object to read inputs

Scanner scr=new Scanner(System.in);

 // variables

String name;

   double price;

   System.out.print("Enter item's name: ");

   // read item's name

   name = scr.next();

   System.out.print("Enter item's price: ");

   // read item's price

   price= scr.nextDouble();

   // print name

   System.out.println("name of item is:"+name);

   // print price

   System.out.println("price of item is:"+price);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read name & price of item from user and assign it to variables "name" & "price" respectively with scanner object.Then print the name and price of item .

Output:

Enter item's name: Apple                                                                                                  

Enter item's price: 100                                                                                                    

name of item is:Apple                                                                                                      

price of item is:100.0

6 0
3 years ago
Which of the following Internet connectivity technologies enables data to be sent over existing copper telephone lines by sendin
Pani-rosa [81]

Answer:

The answer is B. Digital subscriber line technology

Explanation:

Digital subscriber line or DSL technology is used to transmit digital data over telephone wires.

It makes file sharing possible which includes multimedia data (i.e. transfer of pictures and graphics), and also video and audio conferencing.

DSL uses a reliable medium that prevents packet loss and interruptions. It is also fast.

6 0
3 years ago
A technician who is managing a secure B2B connection noticed the connection broke last night. All networking equipment and media
pashok25 [27]

Answer:

<u>d. CRL</u>

<u>e. OCSP</u>

Explanation:

Note, the term PKI stands for Public Key Infrastructure.

Among all the PKI components, the CRL (CERTIFICATE REVOCATION LISTS), which contains a list of issued certificates that were later revoked by a given Certification Authority, and the PFX format used for storing server certificates should be examined by the technician use to validate his assumption.

7 0
3 years ago
How does the CSMA/CD protocol resolve when two network adapters on the same network transmit at the same time?
KengaRu [80]

Answer:

If two network adapters on the same network transmit at the same time, one of the adapters would stop transmitting until the second adapter has finished transmitting before retransmission

Explanation:

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a network protocol used to prevent data collision. CSMA/CD detects collisions by sensing transmissions from other nodes. If a collision is detected, the node stops transmitting, sends a jam signal, and then waits for some time until the channel is idle before retransmission.

If two nodes on the network start transmitting at the same time, the nodes will detect the collision and take the appropriate action.

If two network adapters on the same network transmit at the same time, one of the adapters would stop transmitting until the second adapter has finished transmitting before retransmission

4 0
3 years ago
Other questions:
  • How do you do this question?
    7·1 answer
  • What are the six critical components of an information system? Select three of the six components, and describe a potential vuln
    15·1 answer
  • What is the only language a microprocessor can process directly but most programmers almost never write programs in this code? Q
    12·2 answers
  • Which of the following is the fastest way to open an Access database? a. Right-click the database icon. b. Start Access from the
    13·2 answers
  • Please help with attached file
    8·2 answers
  • Some architectures support the ‘memory indirect’ addressing mode. Below is an example. In this case, the register R2contains a p
    8·1 answer
  • Often an extension of a memorandum of understanding (MOU), the blanket purchase agreement (BPA) serves as an agreement that docu
    11·1 answer
  • What is the meaning of web browser
    11·1 answer
  • Write at least 4 sentences
    9·1 answer
  • Write a java code to print Multiplication Table Till 20
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!