part b: enhancing the chatbot in the part we want to make alterations to the getresponse method of the magpie class to be able to respond to some other words if they happen to appear in what the user inputs.

Answers

Answer 1

The Web Response instance is returned by the Get Response method, which sends a request to a web site.

Get Response completes the request and returns any responses if the request was already started by a call to Get Request Stream. The Web Response is accessible synchronously through the Get Response function.

import java.util.Random;

import java.util.Scanner;

public class ChatBot

{

private int responseCount = 0;

public String getResponse(String value)

{

   String X = longestWord(value);

   this.responseCount++;

   if (responseCount == 10)

   {

       return "Sorry, but our time is up. I can't talk with you any longer.";

   }

   if (value.contains("you"))

   {

       return "I'm not important. Let's talk about you instead.";

   }

else if (X.length() <= 3)

   {

       return "Maybe we should move on. Is there anything else you would like to talk about?";

   }

   else if (X.length() == 4)

   {

       return "Tell me more about " + X;

   }

else if (X.length() == 5)

   {

       return "Why do you think " + X + " is important?";

   }

   else if (X.length() <=9)

   {

   return "Now we are getting somewhere. How does " + X + " affect you the most?";

   }

   return getRandomResponse();

}

public String longestWord(String value){

   Scanner input = new Scanner (value);

   String longest = new String();

   longest = "";

   while (input.hasNext())

   {

       String temp = input.next();

       if(temp.length() > longest.length())

       {

           longest = temp;

       }

   }

   return longest;

}

private String get Random Response()

{

String [] responses = {"OMG", "LOL", "You don't say", "Really?", "I See"};

return responses [(int)(Math.random() * responses.length)];

}

Learn more about response here-

https://brainly.com/question/14967011

#SPJ4


Related Questions

The Euclidean algorithm - The Euclidean algorithm provides a wonderful way to
calculate the greatest common factor of 2 numbers. The greatest common factor,
which is the largest number that divides evenly into 1 or more numbers, is useful
for reducing fractions. The Euclidean algorithm works by dividing 1 number by
the other and finding the remainder. The 2 numbers are redefined, and then the
process is repeated. The process ends when the remainder is equal to 0.
Following is the pseudo code for the algorithm. In c++ use 145 and 87 to test your
program. The program will find the largest common factor of the numbers (the
answer should be 29).

Answers

The largest common factor of the numbers GCF (145, 87) is 29 when remainder R = 0, the GCF is the divisor, b, in the equation. GCF = 29.

How to Find the GCF Using Euclid's Algorithm?

Do the division a ÷ b = c with remainder R given two whole integers where an is bigger than b.

Replace a with b, then R, and repeat the division.

Step 2 should be repeated until R=0.

When R=0, the greatest common factor, GCF, is the divisor, b, in the final equation.

Because the greatest common factor (GCF) and greatest common divisor (GCD) are interchangeable, the Euclidean Algorithm approach may also be used to discover the GCD.

145 ÷ 87 = 1 R 58    (145 = 1 × 87 + 58)

87 ÷ 58 = 1 R 29    (87 = 1 × 58 + 29)

58 ÷ 29 = 2 R 0    (58 = 2 × 29 + 0)

When remainder R = 0, the GCF is the divisor, b, in the last equation. GCF = 29

Since the remainder is zero, the algorithm stops and therefore, the GCF (145, 87) is 29.

To learn more about Euclid's Algorithm here:

https://brainly.com/question/13443044

#SPJ1

what is the alternative name of homepage?​
please help

Answers

web browser's start page or pages.
Web browser start page

Zoe's workstation is being evaluated by an ergonomics specialist. How far away would they recommend she position her monitor?

Question 6 options:

12 inches from her eyes


36 inches from her eyes


20 inches from her eyes


30 inches from her eyes

Answers

Since Zoe's workstation is being evaluated by an ergonomics specialist. The rate that they would  recommend she position her monitor is option C: 20 inches from her eyes.

What is an ergonomic job?

To be more precise, an ergonomist adapts the work to the worker rather than the other way around. The intention is to reduce labor-related discomfort and injury risk. In other words, when we examine a workstation, the employee comes first.

By monitoring how people move in relation to their work environments, ergonomics experts help people execute their tasks more easily. They use their understanding of how the musculoskeletal system works and how people interact with their surroundings to improve workplace safety and productivity.

Therefore, one need to place the monitor at to about 20 inches (that is 51 cm) so that it will be at arm's length from your eyes.

Learn more about ergonomics from

https://brainly.com/question/10975597

#SPJ1

Answer:

20 inches from her eyes

Explanation:

Too easy bru

I what is anti virus

Answers

Anti virus is a software that detects then identifies computer viruses and destroys them

suppose a byte-addressable computer using set associative cache has 2^21 bytes of main memory and a cache of 64 blocks, where each cache block contains 4 bytes.

Answers

Byte addressability, which allows a single character to be read from or written to any memory byte, highlights the key distinction between memory and storage.

Disks, SSDs, and flash drives, on the other hand, can only read and write data in predetermined chunks of hundreds or thousands of bytes.232 B is the main memory size (MM) (32 bit address) Size of Cache Memory (CS): 2 KB = 211 B Block Dimensions (BO): 64 B: 26 22-bit tag Create an associative cache: allow a two-way associative mapping. Number of Lines = 21126 = 25 Number of Lines = 2 11 2 6 = number of sets = 252x=25 number of sets = 2 5 2 x = 2 5 x Formula: Associative mapping formula: MM = tag + set + BO 32 = 22 + 5 - x + 6 x = 1 to determine the number of bits in the tag. In light of this, it is a 21-way set associative mapping. The cache has a two associativity.

Learn more about data here-

https://brainly.com/question/10980404

#SPJ4

a data tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships. is a language associated with a database management system that end users and programmers use to manipulate data in the database.

Answers

Text mining tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

Here's the complete question:

__________ tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

- OLAP

- Text Mining

- Web mining

- Web content mining

What is Text mining?

Text mining is the process of exploring and analyzing large amounts of unstructured text data aided by software that can identify concepts, patterns, topics, keywords and other attributes in the data.

Learn more on Text mining from:

https://brainly.com/question/25578967?referrer=searchResults

#SPJ4

Proportional relationship between x and y, where k is the constant of proportionality. for a moving object, the equation d = st represents a proportional relationship between distance (d) and speed (s) or between distance (d) and time

Answers

Among the three variables, speed is the proportionality constant. Regardless of the distance or location, the speed remains constant.

When two or more parameters are proportional to one another either directly or indirectly, their relationship is stated as a = kb or a = k/b, where k denotes the direction of the relationship between the two variables. The proportionality constant is thus k.

d= st

d = distance

speed is s.

t = time

Among the three variables, speed is the proportionality constant.

The speed is consistent over all locations and distances.

This can be expressed in various ways, as shown below.

d = st

S = d/t

t = d/s

There are other proportional relationships.

V/I = R

V stands for voltage.

I is the Current

R stands for resistance.

This connection is used to determine a device's resistance.

Learn more about speed here-

https://brainly.com/question/28224010

#SPJ4

The complete question is-

The equation y = kx represents a proportional relationship between x and y, where k is the constant of proportionality. For a moving object, the equation d = st represents a proportional relationship between distance (d) and speed (s) or between distance (d) and time (t). Explain the different ways that you can define the constant of proportionality for this equation. Then describe some other equations that represent proportional relationships in the real world and explain why they’re useful. Research on the Internet, if needed.

write the sql code that will yield the total number of hours worked for each employee and the total charges stemming from those hours worked, sorted by employee number.

Answers

Select a.EMP_NUM, e.EMP_LNAME, Round(SUM(a.ASSIGN_HOURS), 1) as SumOfASSIGN_HOURS, Round(SUM(a.ASSIGN_CHARGE), 2) as SumOfASSIGN_CHARGE

From [cis55_31].[dbo].[ASSIGNMENT] a

Inner Join [cis55_31].[dbo].[EMPLOYEE] e

on a.EMP_NUM = e.EMP_NUM

Group By a.EMP_NUM, e.EMP_LNAME

Order By a.EMP_NUM Asc;

Relational databases are managed and various operations on its data are carried out using the standardized programming language known as Structured Query Language (SQL). In addition to database administrators, developers who are building data integration scripts and data analysts who are setting up and running analytical queries all frequently utilize SQL, which was first developed in the 1970s.

SQL is pronounced ess-kew-ell, which means sequel.

For the following, SQL is used:

Adding, updating, and deleting rows of data, as well as retrieving subsets of information from relational database management systems (RDBMSes), are all actions that can modify database table and index structures. These actions can be used for transaction processing, analytics applications, and other applications that call for communication with a relational database.

Learn more about data base here:

https://brainly.com/question/6447559

#SPJ4

database file maintenance typically involves . select all that apply. a. using log files to recover data b. writing new database client software c. compacting the database d. defragmenting the database index

Answers

Database file maintenance typically involves using log files to recover data ,Compacting the database and defragmenting the database index.

We refer to a group of operations that are all carried out with the goal of enhancing your database as database maintenance. There are procedures designed to improve performance, clear disk space, check for data problems, check for hardware issues, update internal statistics, and many other strange things. Database Maintenance, which was previously known as System Utilities when Work Space was first released in 2009, has always been installed alongside Work Space. Unfortunately, it is a little-known aspect of the show. Although I'm sure it's on the Start Menu, few people really click on it, which is disappointing. In order to maintain the peak performance of your server, the "Database Maintenance" application needs to be executed at least once every 14 days.

Learn more about Database maintenanace here:

https://brainly.com/question/25198459

#SPJ4

Question 1
What type of server does your computer communicate with to find the location of a website
on the internet?
Both IPv4 and IPv6
IPv6
URL
DNS
IPv4

Answers

DNS

What is a DNS server?

The World Wide Web and the internet are uncharted territories that depend on computer languages and codes to locate and exchange data and information. The Domain Name System, or DNS, is one of the most essential tools used on the internet. (Despite the fact that many people mistakenly believe "DNS" to stand for "Domain Name Server," it actually stands for "Domain Name System. The TCP/IP protocol suite, which is a collection of rules for how computers exchange data over the internet and various private networks, includes the DNS system. It serves a crucial function by transforming easily recognizable domain names like "howstuffworks.com" into the Internet Protocol (IP) address 70.42.251.42 that computers use to recognize one another on the network. In a nutshell, it is a matching system.

To learn more about DNS refer:

https://brainly.in/question/9910576

this simulation assignment examines the use of synchronous rectification to generate the 1 v, 20 a power supply required by a microprocessor. a 12 v bus is available, and hence the object is to design a 12v:1v buck converter. we will model the microprocessor with a 50 milliohm resistor. download the buck converter zip file for this assignment. this file contains a conventional buck converter that employs a mosfet (irfz44n) and a schottky diode (mbrb2545ct). there is both a 12 v power input vg and a 12 v floating gate driver power supply. the switching frequency is 100 khz. do not change the

Answers

Switching power supply designers started using Synchronous Rectification (SR), which uses MOSFETs to achieve the rectification function normally carried out by diodes, in the late 1990s to fulfill these demands.

Synchronous Rectification (SR), the use of MOSFETs to provide the rectification function traditionally carried out by diodes, was used by switching power supply designers in the late 1990s to meet these demands.

Synchronous Rectification lowers the overall system cost of power supply systems while increasing efficiency, thermal performance, power density, manufacturability, and reliability.

This essay will evaluate the benefits of Synchronous Rectification and go over the difficulties associated with putting it into practice.

To know more about rectification click on the link:

https://brainly.com/question/1463954

#SPJ4

you are a microsoft windows administrator. a user calls you and says their application on a server you support is running slow. what would you look at first when troubleshooting this issue and what questions might you ask the user? detail 10 things you would do to troubleshoot the operating system and hardware on said server.

Answers

Answer:

Explanation:

Application software is a type of software that also carries out another personal, educational, and business function, and its further discussion can be defined as follows:

Each application is designed to support the user in a particular process that could be associated with productivity, creativity, and communication.

In this question except for Windows all "web browser,  Photoshop, and presentation software" is a type of Application software, that is run on OS.  

Windows is a software accumulation known as just an OS that controls a PC (personal computer).

Therefore, the final answer is "Windows operating system ".

Learn more:

brainly.com/question/2949220

Whats the correct answer

Answers

Option C. The code segment that is going to have to create a new movie object would be Movie two = new Movie("Sponge Bob");

What is a code segment?

In computing and in computer programming. When we use the term code segment, we are trying to talk about the part of a text that is a part of the object file. This is known to be in the part of the address space that is written in that code. It has the function of being able to carry out certain instructions that are executable.

In the code here, what the segment is asking to be executed based on what we have is for a new object to be created that is called sponge bob.

This is what is formed and enclosed in the bracket that we have in the option that have been chosen as the solution.

Therefore we would conclude by saying that the code segment that is going to create the object as the question requires would be option C.

Read more on code segments here:

https://brainly.com/question/13506144

#SPJ1

Write a code segment to change the name of the Thing object, something, such that the new name consists of the old name with one character removed at random. For example, if something has name "ABCD", its new name could be set to "ACD". Write the code segment below. Can you help me by writing it in java?

Answers

A code segment to change the name of the Thing object, something, such that the new name consists of the old name with one character removed at random is given below:

The Code Segment

// C++ program to check whether two strings are anagrams

// of each other

#include <bits/stdc++.h>

using namespace std;

/* function to check whether two strings are anagram of

each other */

bool areAnagram(string str1, string str2)

{

// Get lengths of both strings

int n1 = str1.length();

int n2 = str2.length();

// If length of both strings is not same, then they

// cannot be anagram

if (n1 != n2)

 return false;

// Sort both the strings

sort(str1.begin(), str1.end());

sort(str2.begin(), str2.end());

// Compare sorted strings

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

 if (str1[i] != str2[i])

  return false;

return true;

}

// Driver code

int main()

{

string str1 = "gram";

string str2 = "arm";

// Function Call

if (areAnagram(str1, str2))

 cout << "The two strings are anagram of each other";

else

 cout << "The two strings are not anagram of each "

   "other";

return 0;

}

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

view of a database involves how information appears to users and how it can be organized and retrieved. a. rational b. physical c. analytical d. logical

Answers

Logical view of a database involves how information appears to users and how it can be organized and retrieved.

What is a database?

A database also called an electronic database can be define as a collection of related data that is stored in a central location or in multiple locations so that it can be easily accessible, managed, and updated. A database is usually controlled by a database management system (DBMS).

Learn more on Database from:

https://brainly.com/question/28391263?referrer=searchResults

#SPJ4

Is this statement true or false? Today's hard drives have up to or more than 512GB of space.

Answers

Answer:

Luckily true.

Explanation:

Many hard drives nowadays have up to 16TB of space. Popular examples include:

- the iPhone 14 Pro and the iPhone 14 Pro Max, which have 1TB storage.

- Seagate and Toshiba HDD.  

The missing information to find the power equation P=R

Answers

The answer P=R x 12 or V2/ R

1. Which element should be used only when the content simply references the element
a. nav
b. figure
c. article

Answers

The element should be used only when the content simply references the element is option b. figure.

What are the Elements of referencing?

Reference list entries is said to be made up of four elements of the:

The authorThe dateThe  titleThe source.

A reference in computer programming is a value that enables a program to indirectly access a specific piece of information, like the value of a variable or a record, in the computer's memory or in another storage location.

Therefore, the data is referred to as the reference's referent, and accessing the datum is referred to as dereferencing the reference.

Learn more about references from

https://brainly.com/question/21644802
#SPJ1

write a if/else if statement that compares the double variable ph with 7.0 and makes the following assignments to the bool variables neutral, base, and acid:

Answers

A if/else if statement that compares the double variable ph with 7.0    if (pH<7.0){ .A complete java program that prompts a user for the pH value is provided in the explanation section

import java.util.Scanner;

public class ANot {

  public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

      System.out.println("Enter a value for the pH");

      boolean neutral, base, acid;

      double pH = in.next Double();

      if (pH<7.0){

          neutral=false;

          base=false;

          acid=true;

      }

      else if (pH>7.0){

          neutral=false;

          base=true;

          acid=false;

      }}

  else if (pH==7.0){

          neutral=true;

          base=false;

          acid=false;

      }

}

If a certain condition is true, the if/else statement causes a block of code to be executed. Another block of code can be run if the condition is false. The "Conditional" Statements in JavaScript, which are used to carry out various operations depending on various conditions, include the "if/else" statement.

Learn more about statement here-

https://brainly.com/question/2285414

#SPJ4

when you use a(n) language, you create programs by putting together a collection of objects. question 41 options: object-oriented collective object-based high-level

Answers

When you employ an object-oriented language, you build programs by assembling a group of objects.

In contrast to functions and logic, object-oriented programming (OOP) organizes software design around data or objects. Objects can be defined as data fields with specific traits and behaviors.

Instead of focusing on the logic required to handle the objects, OOP focuses on the objects that developers want to control. This approach of programming works best with large, complex, and frequently updated programs. This encompasses mobile applications as well as design and production software. Software to simulate manufacturing systems, for instance, can be developed using OOP.

Due to object-oriented software's organizational structure, the approach is excellent for collaborative development when projects are broken up into groups.

learn more about object-oriented programming

https://brainly.com/question/11023419

#SPJ4

alex is working for alpha technology as a system administrator. the enterprise's sales team uses multiple external drives, often containing confidential data, that they carry between their offices and their clients' offices. what should alex do to ensure that data is secure if it is stolen or lost, and why?

Answers

Based on the fact that Alex works as a systems administrator and his company uses multiple external drives that often contain confidential data, in order to secure the data, Alex should use encryption.

What is Encryption?

This refers to the conversion of information or data into a code in order to protect it from being read and its contents leaked or stolen by an unauthorized source.

This is because the use of encryption would help secure the data that the sales team uses as it would require authentication to access the data if they are stolen.

Read more about encryption here: brainly.com/question/9979590

#SPJ1

Shayla is creating a short video for her class. What is an acceptable file extension for her to use to save her video?

A.
MP3

B.
PNG

C.
MP4

D.
PDF

Answers

Answer: MP3

Explanation:

Your grandma gave you $100 when you were born. On your 1st birthday, she gives you $105. Your 2nd birthday, she gives you $110. Every birthday, she gives you $5 more than your last. Write a program which simulates this using a for loop and an accumulator. Ask the user how old they're turning and calculate how much they will receive this year as well as the total amount of money they have ever received from grandma.
EXAMPLE: On your 5th birthday, you will receive $125. Over your whole life, you will have received $675.

Answers

Answer:

#include <stdio.h>

int main(){

   int total_amount = 100;

   int age, i, amount;

   

   printf("How old are you?: ");

   scanf("%d", &age);

   //int  amount = 100 + (age * )

   for (i = 1; i <= age; i ++){

       amount = 100 + 5 * i;

       total_amount += amount;

   }

   printf("On your %dth birthday you will receive $%d\n\n", age, amount);

   printf("Over your whole life you will have received $%d\n", total_amount);

   

   return 0;

   

}

Explanation:

We start with initial value for total_amount = 100 since at age 0, the total_amount = 100

write a for loop that iterates over all of the integers in the range 0 through 99, inclusive, and prints out all of those numbers that are divisible by both 2 and 5.

Answers

Number = int (input) (div = int (input "Enter the number whose divisibility has to be checked:") Enter the number to check for divisibility with here:) if num%div >= 0, "The number is divisible," print it. else: "The number is not divisible," print that.

The positive numbers between 1 and 11 are 1, 2, 3, 5, 6, 7, 8, 9, and 10. They can be divided in half by 2, 4, 6, 8, or 10. They divide evenly into fifths of 5, 5, and 10. Both lists contain the number 10, which may be divided by both 2 and 5. Currently, a number is three-divisible if the sum of its digits is three-divisible. A number is therefore 2, 3, and 5 times divisible if the rightmost digit is zero. Its digit sum is divisible by three.

for i in range(100): # Numbers between 0 and 100

   if i % 3 == 0 and i % 5 == 0:

       # If i is divisible by 3 and i is also divisible by 5 then print it

       print(i)

Learn more about divisible here-

https://brainly.com/question/21416852

#SPJ4

some computer systems do not provide a privileged mode of operation in hardware. is it possible to construct a secure operating system for these computers? give arguments both that it is and that it is not possible.

Answers

some computer systems do not provide a privileged mode of operation in hardware. yes it possible to construct a secure operating system for these computers

This is theoretically possible by carefully monitoring and scrutinizing the output of just one process while it is being performed. To ensure that we are aware of each process's priority, we must take into account the fact that this will undoubtedly reduce the system's efficiency (it will function considerably more slowly) (which is rather hard if we do not have modes).

This type of equipment would require an operating system that could only operate in control (or monitor) mode. There are two ways that this could be done:

a. Software emulation of all user programs (such as some BASIC, Java, and LISP systems, for instance). What the hardware lacks, the software interpreter would supply in software.

b. Require meant that all programs must be written in high-level languages in order for compilers to output all object code. The protection checks for the missing hardware would be generated by the compiler (either internally or through function calls). It would be an absurdly difficult code.

 

learn more about  privileged mode of operation

https://brainly.com/question/13197356

#SPJ4

4.22 lab*: program: automobile service invoice(1) output a menu of automotive services and the corresponding cost of each service. (2 pts)ex:davy's auto shop servicesoil change -- $35tire rotation -- $19car wash -- $7car wax -- $12

Answers

To write the code for this exercise, we must be familiar with Python's computational language.

The attachment contains the code.

As a result, the Python code can be written as follows:

0 service1 cost

0 service2 cost

print("Services at Davey's Auto Shop")

print("Oil change: $35; Tire rotation: $19; Car wash: $7; Car wax: $12;"

input = service1 ("Select first service: ")

product2 = input ("Select second service: ")

If "Oil change" is service 1, then

35 service1 cost

Tire rotation: elif service1 == true

cost1 service1 = 19

"Car wash," if service1 is true:

cost service1 = 7

"Car wax" if service1 is true:

cost service1 = 12

if (service1) == "-":

service 1 equals "No service"

0 service1 cost

When service2 equals "Oil change,"

35 service2 cost

Tire rotation: elif service2 == true

cost2 service2 = 19

"Car wash" if service2 is true:

cost2 service2 = 7

"Car wax" if service2 is true:

cost2 service2 = 12

To know more about python click on the link:

https://brainly.com/question/18502436

#SPJ4

zach wants to install windows 10 over his existing copy of windows 10. he wants to keep his personal files, apps, and windows settings but freshen up all windows components. he currently has a usb drive with a windows 10 iso.

Answers

He wants to keep his personal files, apps, and windows settings but freshen up all windows components. he currently has a usb drive with a windows 10 ISO  need to Repair upgrade.

When installing Windows 10 on a computer, insert a DVD or attach a USB flash drive.

your computer, restart it.

Then click Next on the Install Windows page after choosing your preferred language, time zone, and keyboard.

To install Windows, choose Install Windows or insert your installation drive or DVD.

reboot the computer.

To boot from a media, choose that option.

Then click Next after choosing your preferred language.

Install now by clicking.

After entering your product key, click Next.

Accept the terms.

Observe the directions displayed on the screen.

Learn more about windows here:

https://brainly.com/question/19425412

#SPJ4

s an information system that enables users to retrieve data from the web by using keywords related to their topic of interest. a. data warehouse b. data mart c. search engine d. web server

Answers

A search engine is an information system that enables users to retrieve data from the web by using keywords to search for their topic of interest. So, the correct choice for this question is (c). i.e. Search Engine.

Search engine helps the user to search for their keywords and retrieve related data from the websites that are indexed by a search engine. It enables user to retrieve data from a website. When users enter any keywords related to their topics, the search engine searches those keywords from the repository that has been indexed against that keywords. There are many search engines in the world such as Goo-gle, Ya-hoo and Bin-g.  They help user to search the required information over the internet.

However, the other options are not correct because:

A data warehouse is a repository or collection of different databases that aims to perform business intelligence functions, while a data mart is the simplest form of a data warehouse that focuses on a single subject of business. Whereas a web server contains a collection of websites to serve the users against the information they want to search on that websites.

You can learn more about search engines at

https://brainly.com/question/512733

#SPJ4

define a function named swapvalues that takes four integers as parameters and swaps the first with the second, and the third with the fourth values. c

Answers

swapvalues that takes four integers as parameters and swaps the first with the second, and the third with the fourth values here we are finding swaping of variables in c programming

Output Rephrased Text

// CPP program to change 4 variables without

/ using temporary variable.

< bits/ stdc. h>

using namespace std;

void exchange( int a, int b, int c, int d)

{

/ switching a and b variables

a = a b;

b = a- b;

a = a- b;

/ switching b and c variables

b = b c;

c = b- c;

b = b- c;

/ switching c and d variables

c = c d;

d = c- d;

c = c- d;

cout<<" values after switching are"<< endl;

cout<<" a = "<< a<< endl;

cout<<" b = "<< b<< endl;

cout<<" c = "<< c<< endl;

cout<<" d = "<< d<< endl;

/ motorist law

int main()

/ initialising variables

int a = 1;

int b = 2;

int c = 3;

int d = 4;

cout<<" Values before switching are"<< endl;

cout<<" a = "<< a<< endl;

cout<<" b = "<< b<< endl;

cout<<" c = "<< c<< endl;

cout<<" d = "<< d<< endl<< endl;

/ Function call

exchange( a, b, c, d);

return 0;

Values before switching are

a = 1

b = 2

c = 3

d = 4

values after switching are

a = 2

b = 3

c = 4

d = 1

Read more about swap and variables functions at:

brainly.com/question/14284563

#SPJ4

write a short note on primary key​

Answers

Answer: the column or columns that contain values that uniquely identify each row in a table.

Other Questions
The Great Gatsby:Discuss the facts Nick reveals about himself and compare these facts to his revelations about the other characters. IsNick honest about himself and his beliefs? What type of person is he compared to the other characters? Determine ifNick presents himself as a believable character? Does he reveal both his good and bad sides? Cite references from thenovel Combine like terms and simplify please I need help with homework Find the measure of angles 1 and 2I really need to get this done by today! 2.Suppose one day, like Patrick, you find an elf in your room. How would you feel on seeing the elf? Imagine the situation and write the dialogue What island, an "unincorporated territory" of the u. S. , was devastated by a recent hurricane, and president joe biden and first lady jill biden visited there this week?. What is 7.68 rounded to the nearest half's multiply. what is the product (3 x 10^9) x (2 x 10^17) in scientific notation At an old gas station, gasoline leaks from an underground storage tank. what is the classifcation? 5. If the standard error of the sampling distribution of the sample proportion is 0.0337 for samples of size 200, then the population proportion must be either: HELP In this unit, you will investigate some real-world scenarios which can be modeled through logarithmic functions. In particular, we'll investigate three phenomena using logarithmic models: magnitude of earthquakes, intensity of sound, and pH (or acidity) of substances. Research online and find an additional scenario not mentioned above that uses logarithmic functions, and explain why it is beneficial to your everyday life. Be sure to cite any sources you used in your response. help asap pls!!!!!!!!! Communication which takes place without direct verbal communication because most of the meaning is internalized in the person is known as _____ communication. How did the declaration of Independence support the notion of rebelling against Britain divide r by 8, then double the result what is similar between the Divine Comedy and don't go gentle into that good night? need this in 10 min please help Santa and his elves had a workshop that allowed them to produce 22{,}912{,}546{,}99222,912,546,99222, comma, 912, comma, 546, comma, 992 toys each year.The world population increased, so they built a new workshop. The new workshop allows them to produce 4{,}134{,}232{,}638{,}9374,134,232,638,9374, comma, 134, comma, 232, comma, 638, comma, 937 toys each year.Approximately how many times as many toys can the new workshop produce each year compared to the old workshop?Choose 1 answer:Choose 1 answer: AirPod Pros sell for $249 regularly. Cyber Monday deals offered them for 20% off. How much could be saved by buying them on Cyber Monday? technological advances: group of answer choices shift only the short run aggregate supply curve to the right. shift only the long run aggregate supp the nurse is assessing a multipara client who presents to the hospital after approximately 2 hours of labor and notes the fetus is in a transverse lie. after notifying the rn and primary care provider, which action should the lpn prioritize?