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
MariettaO [177]
3 years ago
14

Write an algorithm to show whether a given number is even or odd.

Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
6 0

Answer:

int num = Console.ReadInt("Please enter a number");

if(num%2 == 0) {

Console.WriteLine("Number is even");

} else {

Console.WriteLine("Number is odd");

Explanation:

You might be interested in
Communication protocols, sets of rules agreed to by all parties, are designed in order to:
mote1985 [20]

Group of answer choices.

A. Ensure that cell phones and laptops cannot communicate.

B. Give each country its own internet language.

C. Ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

D. Assure that computers and other devices don't pollute the environment.

Answer:

C. Ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

Explanation:

OSI model stands for Open Systems Interconnection. The seven layers of OSI model architecture starts from the Hardware Layers (Layers in Hardware Systems) to Software Layers (Layers in Software Systems) and includes the following;

1. Physical Layer

2. Data link Layer

3. Network Layer

4. Transport Layer

5. Session Layer

6. Presentation Layer

7. Application Layer

Each layer has its unique functionality which is responsible for the proper functioning of the communication services.

Additionally, a standard framework for the transmission of informations on the internet, it is known as the internet protocol suite or Transmission Control Protocol and Internet Protocol (TCP/IP) model. One of the very basic rule of the TCP/IP protocol for the transmission of information is that, informations are subdivided or broken down at the transport layer, into small chunks called packets rather than as a whole.

Hence, communication protocols, sets of rules agreed to by all parties, are designed in order to ensure that new technologies and devices that haven't been invented yet can all use the same methods of communication.

This ultimately implies, there exist standard frameworks and protocols that are designed and developed to serve pre-existing technologies and devices, as well as those that would be invented in the future.

For example, SMTP is an acronym for Simple Mail Transfer Protocol and it uses the standard port number of 25 to provide clients with requested services on an internet-enabled device.

3 0
3 years ago
A stateless firewall inspects each incoming packet to determine whether it belongs to a currently active connection.
satela [25.4K]

Answer:

False

Explanation:

Stateless firewall uses characteristics of the incoming packet to determine whether the packet should be permitted or rejected. Examples of such packets characteristics include:

- Source IP address

- Destination IP address

- Protocol

- Port

Stateless firewall does not keep track of active connection (state information) to be able to filter packets by that criteria.

3 0
3 years ago
How do you save a document in a format so that any reader can view it?
dedylja [7]
You save and download it and then convert it into a format by eight clicking and open as
6 0
2 years ago
Which of the following are documents that can help you to review and assess your organization’s status and state of security? Fi
pashok25 [27]

Answer: Incident response plan

Explanation: Incident resource plan is the strategy that is created in the form of plan in the information technology (IT) department. This plan is made for the detection of the staff, issue or problem that arise, loss of data etc. This plan works in the situations like cyber-crime, data hacking etc.

Other options are incorrect because they done have any well defined strategy for the hacking or attacking situation rather control the security issues. Thus the correct option is incident response planning.

7 0
3 years ago
Write a Twitter class that sets the Twitter user first (who is to be followed) and lets the client add up to 5 followers, which
Rzqust [24]

Answer:

Twitter.h

========

#ifndef Twitter_h

#define Twitter_h

#include <iostream>

using std::string;

using std::cout;

using std::endl;

template <typename T>

class Twitter

{

private:

string name;

T followers[5];

int numFollowers;

public:

Twitter(string n);

bool AddFollower(T follower);

bool RemoveFollower(T follower);

void PrintFollowers();

};

template <typename T>

Twitter<T>::Twitter(string n)

{

name = n;

numFollowers = 0;

}

template <typename T>

bool Twitter<T>::AddFollower(T follower)

{

if(numFollowers < 5)

{

followers[numFollowers] = follower;

numFollowers++;

return true;

}

else

return false;

}

template <typename T>

bool Twitter<T>::RemoveFollower(T follower)

{

int index;

bool found = false;

for(index = 0; index < numFollowers; index++)

{

if(followers[index] == follower)

{

found = true;

break;

}

}

if(found)

{

//shift all other followers after the one to be removed to one position left

for(++index; index < numFollowers; ++index)

{

followers[index-1] = followers[index];

}

numFollowers--;

return true;

}

else

return false;

}

template <typename T>

void Twitter<T>::PrintFollowers()

{

cout << "Followers for " << name << endl;

for(int i = 0; i < numFollowers; i++)

cout << followers[i] << endl;

 

cout << "------" << endl << endl;

}

#endif /* Twitter_h */

main.cpp

=========

#include "Twitter.h"

#include <iostream>

using namespace std;

struct Profile {

string userName;

int age;

string state;

};

 

ostream& operator << (ostream & output, Profile p) {

output << p.userName;

return output;

}

bool operator == (const Profile &p1, const Profile p2)

{

return p1.userName == p2.userName;

}

int main()

{

Twitter<string> t1("John");

Twitter<Profile> t2("Bob");

 

cout << "Adding followers to John" << endl;

t1.AddFollower("Bill");

t1.AddFollower("Jack");

t1.PrintFollowers();

 

Profile p1 = {"Alice", 20, "Alaska"};

Profile p2 = {"Janet", 22, "California"};

Profile p3 = {"Jim", 20, "Texas"};

 

cout << "Adding follower profiles to Bob" << endl;

t2.AddFollower(p1);

t2.AddFollower(p2);

t2.AddFollower(p3);

t2.PrintFollowers();

 

cout << "Removing Bill from John" << endl;

t1.RemoveFollower("Bill");

 

cout << "Removing Janet's profile from Bob" << endl << endl;

t2.RemoveFollower(p2);

 

t1.PrintFollowers();

t2.PrintFollowers();

 

 

 

}

output

-======

Adding followers to John

Followers for John

Bill

Jack

------

Adding follower profiles to Bob

Followers for Bob

Alice

Janet

Jim

------

Removing Bill from John

Removing Janet's profile from Bob

Followers for John

Jack

------

Followers for Bob

Alice

Jim

------

Explanation:

4 0
3 years ago
Other questions:
  • In​ today's global​ environment, everything and everyone are digitally connected to everything and everyone else. The term used
    6·1 answer
  • Most graphics software uses a process called pixel _________ to create new pixels by averaging the colors of nearby pixels.â
    6·1 answer
  • Which one of the following will not be considered as a microcomputer?
    12·2 answers
  • How designers have created products from waste materials?
    7·1 answer
  • The acceleration of a body is 3 metre per second square what does it mean​
    11·2 answers
  • 2. (8 points) When creating the Academic Database, there were several instances of data
    11·1 answer
  • Does anyone know the answer for this? I’m extremely confused.
    8·2 answers
  • . What is the difference between a combinational circuit and sequential circuit? Give example of each.
    8·1 answer
  • If Laura wanted to solve a problem using recursion where the last statement executed is the call to the same method, what type o
    8·1 answer
  • Write long answer to the following question. a. Define microcomputer. Explain the types of microcomputers in detail.​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!