Write a method named areFactors that takes an integer n and an array of integers, and that returns true if the numbers in the array are all factors of n (which is to say that n is divisible by all of them).

Answers

Answer 1

Answer:

The c++ program to show the implementation of parameterized method returning Boolean value is shown below.

#include<iostream>

using namespace std;

bool areFactors(int n, int arr[]);

int main()

{

   int num=34;

   int factors[5]={2, 3, 5};

   bool result;    

   result = areFactors(num, factors);

   if(result == true)

       cout<<"The number "<<num<<" is divisible by all factors."<<endl;

   else

       cout<<"The number "<<num<<" is not divisible by all factors."<<endl;        

   return 0;

}

bool areFactors(int n, int arr[])

{

   bool divisible=true;

   int flag=0;    

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

   {

       if(n%arr[i] != 0)

       {

           divisible = false;

           flag ++;

       }

   }

   if(flag == 0)

       return true;

   else

       return false;

}

OUTPUT

The number 34 is not divisible by all factors.

Explanation:

This program shows the implementation of function which takes two integer parameters which includes one variable and one array. The method returns a Boolean value, either true or false.

The method declaration is as follows.

bool areFactors(int n, int arr[]);

This method is defined as follows.

bool areFactors(int n, int arr[])

{

   bool divisible=true;

// we assume number is divisible by all factors hence flag is initialized to 0

   int flag=0;    

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

   {

       if(n%arr[i] != 0)

       {

           divisible = false;

// flag variable is incremented if number is not divisible by any factor

           flag ++;

       }

   }

// number is divisible by all factors

   if(flag == 0)

       return true;

// number is not divisible by all factors

   else

       return false;

}

The Boolean value is returned to main method.

bool result;

       result = areFactors(num, factors);

This program checks if the number is divisible by all the factors in an array.

There is no input taken from the user. The number and all the factors are hardcoded inside the program by the programmer.

The program can be tested against different numbers and factors. The size of the array can also be changed for testing.


Related Questions

As a good security practice in a corporate environment, what is the type of ruleset that would be applied to the end of an access control list (acl) on the inbound and outbound border firewall(s)?

Answers

I don't know Search on Google

I don't know Search on Google

Explain one way world war ii?-era advances in computers

Answers

Answer: It forced almost the whole world to advance in computers and other technology.    

Explanation: When WWII started everyone had there older computers but when country's got destroyed, along with millions killed. It sparked a revolution, which lead to many new inventions such as the ATM, but also a huge advance in computers and technology.

How do i add the sum of a column in excel?

Answers

Excel has a built in sum function to calculate the sum of elements. The syntax of this function is:

=sum(argument)

This formula is written in the destination cell where we need our sum to show up.

The argument is the cells , columns or range of cells and columns for which we need to find the sum. If we need to find the sum of elements in a column, the formula will be like:

= sum(A:A)

This formula will find the sum of all elements that are present in the column A. The argument in the above formula is A:A which represents that entire column A is selected.

This formula can be modified according to the needs. For example, if we need to find the sum of two columns A and B, the formula will be:

=sum(A:B)

This formula calculates the sum of all elements in columns A and B.

Write the definition of a class PlayListEntry containing: An instance variable title of type String, initialized to the empty String. An instance variable artist of type String, initialized to the empty String. An instance variable playCount of type int, initialized to 0.

Answers

// Making c++ class

class PlayListEntry{

string title;

// We cannot initialize it here in C++, ...or in many other languages as wellas i //am writing c++ class

// so i will initialize them in constructor.

string artist;

int playCount;

PlayListEntry(){

// we will initialize the variable in constructor so that they will have the desired //value when you will instantiate the class

title = ' ';

artist = ' ';

playCount = 0;

}

};

The definition of a class PlayListEntry containing: An instance variable title of type String, initialized to the empty String  

The Program

private String artist = "";

   private int playCount = 0;

}

The class PlayListEntry has three instance variables: title of type String, artist of type String, and playCount of type int. These variables are initialized to empty strings ("") for title and artist, and 0 for playCount.

The class provides a blueprint for creating objects that represent entries in a playlist, with each entry containing information about the title, artist, and the number of times it has been played.

Read more about programs here:

https://brainly.com/question/30783869

#SPJ6

What is a public key infrastructure? Select one: a. A structure that enables parties to use communications such as email b. A structure that provides all of the components needed for entities to communicate securely and in a predictable manner c. A structure that enables secure communications in chat rooms, instant messaging, and text messaging d. Is A method of securing communications through the use of a single shared key

Answers

Answer:

B. A public key infrastructure (PKI) allows users of the Internet and other public networks to engage in secure communication, data exchange and money exchange. This is done through public and private cryptographic key pairs provided by a certificate authority.

you are configuring a firewall to all access to a server hosted in the demilitarized zone of your network. You open IP ports 80, 25, 110, and 143. Assuming that no other ports on the firewall need to configured to provide access, which applications are most likely to be hosted on the server

Answers

These days and for the current scenario NODE JS is the best application because:

1. Its really fast to get the other 3rd party data.

2. Asyn nature of Node makes it reliable and very efficient when there is high traffic on the server.

3. The 3rd party tools support for Node JS is very high.

4. It is highly flexible.

Dr. Apple wants to study a drug to manage diabetes in adolescents. The researcher plans to use an electronic informed consent (eIC) form presented on a tablet device. Per FDA guidance on the “Use of Electronic Consent in Clinical Investigations” (2016), can adolescent subjects assent using an electronic device?

Answers

Answer: Yes, the eIC could be used for assent.

Explanation:

Electronic informed consent (eIC) may be used for seeking, confirming and documenting informed consent.

Answer:

TRUE, the eIC process can be used for assent.

Explanation:

The eIC process can be used to obtain the consent of pediatric subjects and parental permission.

Technological advances led to new forms of data collection in clinical research. This type of process seeks to provide adequate information about the research to the subjects who participate in it in order to allow this information to allow them to make a voluntary decision about their inclusion in the study.

Limiting the amount of personal information available to others includes reducing your ______________ footprint

Answers

The blank should be filled with "digital"

What computer company was founded in 1975?

Answers

Microsoft company was founded in 1975

Sales management wants a small subset of users with different profiles and roles to be able to view all data for compliance purposes. How can an administrator meet this requirement? - Assign delegated administration to the subset of users to View All Data - Create a permission set with the View All Data permission for the subset of users - Enable the View All Data permission for the roles of the subset of users - Create a new profile and role for the subset of users with the View All Data permission

Answers

Answer:

Last Option is correct answer. ( Option D)

Explanation:

Option A is rejected because this will allow the view permission but as mentioned the management want a new profile for the users as well.

Option B is rejected because again it will not facilitate the different profile requirement.

Option C is not answer because It will only help in viewing the data and granting permission.

Option D is selected because it will meet both requirements which are to make a new profile first of all and then grant the View permissions to these profiles for the user subset.

___________ consists of evaluating the relevant factors in a client’s life to identify themes for further exploration. a. Differential diagnosis b. Assessment c. Psychological diagnosis d. Psychometric testing

Answers

Answer:

D

Explanation:

max is a method that accepts two int arguments and returns the value of the larger one. Four int variables, population1, population2, population3 and population4 have already been declared and initialized. Write an expression (not a statement !) whose value is the largest of population1, population2, population3 and population4 by calling max. Assume that max is defined in the same class that calls it.

Answers

Answer:

Hello, I imagine that you use Java as the programming language since you refer to classes, so I will make a small code that simulates a Java program with the descriptions you need.

public class Example {

 

 

 public int Max(int population1, int population2, int population3, int population4) {

   int max = 0;

   if(population1 > population2 && population1 > population3 && population1 && population4){

       max = population1;

   }

   else if(population2 > population1 && population2 > population3 && population2 && population4){

       max = population2;

   }

   else if(population3 > population2 && population3 > population1 && population3 && population4){

       max = population3;

   }

   else {

       max = population4;

   }

   return max;

 }

 

 public static void main(String[] populations) {

   Example myObject = new Example();

   int population1 = 1;

   int population2 = 2;

   int population3 = 3;

   int population4 = 4;

   int max = myObject.Max(population1,population2,population3,population4);

   System.out.println(max); // 4

 }

}

Final answer:

The expression to find the largest value among four integer variables using the max method would be max(max(max(population1, population2), population3), population4).

Explanation:

To find the largest value of population1, population2, population3, and population4 by calling the max method, you would use a nested call to the max method. You would call the max method with two of the populations, and then use the result along with the next population in another call to max, and repeat this until all populations have been considered. This results in an expression (not a statement) that looks like this:

max(max(max(population1, population2), population3), population4)

This expression uses the max method to first compare population1 and population2, then compare the result of that with population3, and finally compare the result of the previous comparisons with population4 to find the largest of the four values.

How to solve "You cannot call a method on a null-valued expression" error

Answers

You have an object declared in the function which has a undeclared value.

Explanation:

if you will make a variable of class or object in JAVA or other reference typed languages and will not assign the value to it this error occurs.

For example :

obj object;   // this line declares a object named variable of type obj class

Here it will cause same error iff i will do it like :

obj = object = new obj();

AT&T reacted to the popularity of the cellular phone by adding several cellular models to its line of regular phones. Availability and popularity of cellular phones is most likely due to changes in the __________________________ environments.

Answers

Answer:

Social Technological environment

Explanation:

The trend of people towards a technology is the main reason for that technology to take exponential growth and keep the status. As out societies are getting many earning facilities and business facilities and many knowledge areas are made theses days due to cellular phones, so the social environment is taking major part in popularity of them. And as they become popular, society tends to provide them as soon as possible in cheap ways and in best quality.

Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The following methods provide these behaviors: turnOn and turnOff. Both methods accept no arguments and return no value. Assume there is a reference variable officeAC of type AirConditioner. Create a new object of type AirConditioner and save the reference in officeAC. After that, turn the air conditioner on using the reference to the new object.

Answers

//making reference object.

// the following line will declare a officeAC object of type AirAconditioner by //calling the class constructor by reference using "new" operator.

AirConditioner officeAC =  new AirConditioner();

// the following line will can the method of class AirConditioner to turonOn //the AC

officeAC.turnOn();

What will be the output of the following code snippet? token = False while token : print("Hello")
A) "Hello" will continue to be displayed until the user stops the program.
B) No output because of compilation error.
C) No output after successful compilation.
D) "Hello" will be displayed only once.

Answers

Answer:

Hi!

The correct answer is B.

Explanation:

The code snippet doesn't follow the correct form of writing a while loop, so it will crash when compiles.

One correct form to write the code is:

token = false;

while (token){ // Evaluate token, if true prints else terminates the loop. In this case, token is false so, no output and finish the program.

     print("Hello");

   };

"A Windows laptop is being used by a teacher in an outdoor (but protected by an overhang) setting. What setting would ensure that the laptop will not go into hibernate mode during the presentation?"

Answers

1.Click the battery btn and go into power option.

2.Go into "When to turn off display" from left side bar menu.

3.And select for brightness drop down as never dims the display.

This will make the display turn on, no matter if the PC keyboard btn or mouse hower is clicked or not.

What is the purpose of an exhaust emission system

Answers

Exhaust Harmful Gasses : It is very useful in keeping harmful gasses produced by the vehicle away from driver and passengers.

Keep Environment clean : It is used to convert the gasses being produced in vehicles to convert them into the form which is least harmful for the environment.

Noise : It significantly reduces the noise produced. It keeps the car surrounding pleasant by removing the noise.

In a class hierarchy A. The more general classes are toward the bottom of the tree and the more specialized are toward the top B. The more general classes are toward the top of the tree and the more specialized are toward the bottom C. The more general classes are toward the left of the tree and the more specialized are toward the right D. The more general classes are toward the right of the tree and the more specialized are toward the left

Answers

Answer:

Option B

Explanation:

Option A is rejected because the general behavior of the objects are the reason that the classes concept was introduced and thus the general class should be on the top.

Option B is selected because down the hierarchy the common behavior in classes are reduced and thus they became more specialized and thus the specialized classes should be bottom to the general ones.

Option C is rejected because hierarchy works from top to bottom not from left to right.

Option D is not answer because hierarchy has nothing to do with left and right.

Who needs to approve a change before it is initiated? (Select TWO.)


-Change board


-Client or end user


-CEO


-Personnel manager


-Project manager

Answers

Final answer:

Changes must typically be approved by the Change board and the Project manager before being initiated. Input from stakeholders such as clients or end users is also valuable for buy-in, but formal approval is usually from specific governing entities.

Explanation:

The individuals or groups that need to approve a change before it is initiated typically include the Change board and the Project manager. The Change board, also known as a change advisory board (CAB), is responsible for assessing and approving significant changes to ensure they align with the project's goals and the organization's strategic direction. The Project manager is accountable for the successful execution of the project and must ensure that any changes fit within the project's scope, budget, and timeline.

The involvement of other stakeholders such as the Client or end user may be required depending on the nature of the project and the organizational structure. The Client or end user is crucial for providing buy-in, as their feedback validates the relevance and potential impact of the change on the final deliverables. Input from stakeholders at all levels is essential, yet the formal approval typically rests with specific entities tasked with governance.

Each organization has different protocols, and depending on the size and type of organization, other roles such as the CEO or Personnel manager can be involved; however, typically their approval is not required for initiating changes unless stipulated by the organizational policies.

An array of int named a that contains exactly five elements has already been declared and initialized. In addition, an int variable j has also been declared and initialized to a value somewhere between 0 and 3. assign the programming symbols

Answers

Answer:

Hi, according to your description you need the code that represents the statement I will use C++ language to describe the code.

// Example program

#include <iostream>

int main()

{

int a [5] = [1,2,3,4,5];

int j = 0;

  return 0;

}

Explanation:

In this language you must have to declare in the header the libraries that you include in your main program, after that a function main where your put your logical algorithm in fact, you declare the algorithm that you need. In this case declare a variable and assign an array of 5 positions and a j variable and assign a number between 0 and 3.

I hope it's help you.

Write a statement that reads an integer value from standard input into val. Assume that val has already been declared as an int variable. Assume also that stdin is a variable that references a Scanner object associated with standard input.

Answers

// Declaring the Scanner built in class object to get input

Scanner stdin =  new Scanner(System.in);

// this will flag the compiler that stdin is the variable that is used to get input

// through utility functions provided by the Scanner class

val = stdin.nextint();

// nextint() is the utility method of scanner class used to get input

Invalid length parameter passed to the LEFT or SUBSTRING function (below)".
How can this be handled?

LEFT(U.FULLNAME,charindex(',', U.FULLNAME)- 1) AA, CHARINDEX(LEFT(U.FULLNAME,charindex(',', U.FULLNAME)- 1), P.Project_Name) CCOUNT

Answers

This error occurs when the number of arguments sent to the function are not equal ( greater or less ) to the parameters of the function.

For example:

// if the function is

void a_function(int a, int b){

// does some computations

}

// Now when i will call it as

a_function(3);

// Same error as you are getting will occur because the function expects 2 //argements and i am passing one.

Same will happen if i will call it as:

a_function (1,2,3);

Here i am passing one extra argument.

So, i will suggest to count the left function parameters and the arguments you are passing here in this function and you will find the mistake.

Which sentence(s) below are true?a. IP stands for Internet Protocol.b. In most home networks IP addresses are assigned by the Internet Service Provider. c. If two laptops are connected to the same home network and surfing the web simultaneously, each laptop must have its own IP address. d. If two laptops are connected to the same home network and surfing the web simultaneously, they share the same IP address.

Answers

Option A is true because IP is short form of Internet protocol.

Option B is true because when every device is connected to the servers by using internet, Internet Service providers assign them unique IP address to define their identity on internet and monitor their activities.

Option C is false because no matter how many laptops or devices are connected to a same router through a network Internet Service Providers assign them a same IP address.

Option D is true because every laptop or device connected to the internet by a network is given the same public IP or external IP.

IP does stand for Internet Protocol, and in a home network, IP addresses are assigned by the ISP. Each device on a local network has its own IP address, but all share the same external IP address when accessing the Internet.

IP stands for Internet Protocol, which is a set of rules governing the format of data sent over the Internet or other networks. Let's address the student's questions one by one:

a. True. IP does indeed stand for Internet Protocol.b. True. In most home networks, IP addresses are usually assigned dynamically by the Internet Service Provider (ISP).c. True. If two laptops are connected to the same home network and are surfing the web simultaneously, each laptop must have its own IP address internally, within the local network, often provided by the router.d. False. While each device on the home network has its own internal IP address, all devices share the same external IP address assigned by the ISP when connecting to sites and services on the Internet.

Each device on a network communicates with other parts of the network (and the Internet) using an IP address, which serves as a unique identifier. In the context of a home network, the router typically assigns an internal IP address to each device, while the ISP assigns one external IP address to the entire network.

Which combination of options is the keyboard shortcut to access the Find dialog box and search a worksheet for particular values? Ctrl+H Ctrl+R Ctrl+F Ctrl+E

Answers

Answer:

[tex]\boxed{Ctrl}+\boxed{F}[/tex]

Explanation:

To remember this, remember that the F in Ctrl+F stands for “Find”.

Ctrl+H is a similar function called Find and Replace, which allows you to search for a value then replace all instances of it with a new value.

Ctrl+R fills from the selected cell(s) and to the right.

Ctrl+E activates the Flash Fil feature, which recognizes a pattern and fills in remaining cells automatically.

Answer:

ctrl+F

Explanation:

edginuity 2020

Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number. (Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)

Answers

// Writing a c++ program

// Making a variable to take input

int input=0;

cout<<"Enter the number ";

cin>>input;

// checking if the entered number is positive and not 0

if(input>0){

// if the mode of number with 2 is 0 then it is Even

 if(input%2==0)

      cout<<"The number is prime.";

// if mode is 1 then its ODD

 else if(input%2==1)

        cout<<"The number is ODD.";

}

What is a digital certificate? Select one: a. It is a means of establishing the validity of an offer from a person, entity, web site, or email. b. It is a centralized directory wherein registered keys are created and stored. c. It is a means of establishing your credentials electronically when doing business or other transactions on the Web. d. It is an entity that generates electronic credentials and distributes them upon proving their identity sufficiently.

Answers

Option D is the answer because Digital Certificate is an entity that generates electronic and distributes them upon proving their identity sufficiently. In early days there was issues with people using the certificates that were not even issued by the organizations. Today it's a cryptographic technique which uses digital signatures and gives users a digital certificate that can be authenticated anytime online by any organization and is unique for every user having it.

Option A cannot be the answer because it has nothing to do with the identity of person but rather it is for specific fields.

Option B is not answer because it has no key and score matter to do with it.

Option C Web transactions has nothing to do with the certificates.

HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. Some of the codes and their meanings are listed below: 200, OK (fulfilled) 403, forbidden 404, not found 500, server error Given an int variable status, write a switch statement that prints out, on a line by itself, the appropriate label from the above list based on status.

Answers

// Making a function that will take a integer as argument and return  print the code

void Print(int statuscode){

// starting the switch statement on the interger sent

switch(statuscode)

  case 200: // for case 200

              cout << "Ok,Fullfilled"<< endl;

  case 403: // for case 403

             cout << "Forbidden" << endl;

   case 404: // for case 404

             cout << "Not Found" <<endl;

   case 500: // for case 500

             cout << "Server Error "<< endl;

    default: // default case

              cout << " Wrong code"<<endl;

}

Write an if/else statement that compares the variable age with 65, adds 1 to the variable seniorCitizens if age is greater than or equal to 65, and adds 1 to the variable nonSeniors otherwise show the age of seniorCitizens.

Answers

Answer:

Hi!

Explanation in Javascript:

int age;

int seniorCitizens = 0;

int nonSeniors = 0;

while(true) { //infinite loop, always true.

age = getAge(); // gets the age.

if (age >= 65) { // if age is greater or equal to 65 adds 1 to seniorCitizens and show the age.

o

seniorCitizens = seniorCitizens + 1;

print (age);

}

else { // otherwise adds 1 to nonSeniors.

nonSeniors = nonSeniors + 1; //

}

Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0

Answers

Answer:

total=0;

do{

cin >> amount;

if (amount>0)

total += amount;

}

while (amount >=0);

Explanation:

A loop that reads integers into amount and adds all the non-negative values into total is shown below.

Now, Here's a code snippet that should do what you're asking for:

int total = 0;

int amount = 0;

while (amount >= 0) {

   // read integer input from user

   scanf("%d", &amount);

   

   // add input to total if non-negative

   if (amount >= 0) {

       total += amount;

   }

}

Here's how this code works:

First, we initialize total to 0 and amount to 0.

Then we enter a while loop that will continue as long as amount is non-negative.

Within the loop, we read an integer input from the user using the scanf function.

We then check if the input is non-negative using an if statement.

If the input is non-negative, we add it to the total variable.

If the input is negative, we skip the if statement and proceed to the end of the loop, at which point the loop terminates.

Finally, once the loop terminates, we have added up all the non-negative input values, and total contains their sum.

To learn more about code snippet refer here

brainly.com/question/30467825#

#SPJ6

Other Questions
Direct Stafford Loans are funded by the What was an economic result of soldiers being drafted to fight in World War I? A. Demand for workers dropped. B. Supply of workers increased. C. Unemployment in home countries dropped. D. Unemployment in home countries increased. Fatty acids are released from adipocytes when: a. insulin levels are high. b. glycerol-3-phosphate levels are high. c. adipose ATP levels are high. d. blood glucose levels are low. e. none are true. Does drive theory offer a comprehensive account of motivation? A. No. Drive theory offers a satisfactory explanation of physiological motives but fails to account for psychologically-based motives. B. Yes. Drive theories of physiological motives have been empirically supported. C. Yes. Drive theory offers a satisfactory explanation of not only physiological motives, but also psychologically-based ones. D. No. Drive theory fails to account for many motives, including physiological ones. write two linear functions, f(x) and g(x). For example, f(x)= 3x-7 and g(x)= -2x+5. Then see whether f(x) - (-g(x)) is equivalent to f(x) + g(x). Why is aggression a negative quality to bring to a sport? What is the first term of the quotient of the following division problem? (x3 1) (x + 2) A standard deck of 52 playing cards contains four of each numbered card 210 and four each of aces, kings, queens, andjacks. Two cards are chosen from the deck at random.Which expression represents the probability of drawing a king and a queen?522669)522GP,3GP)522(CGC)522 which rule represents the translation of hexagon D'E'F'G'H'I' ?A. (x, y) -> (x - 8, y - 7)B. (x, y) -> (x - 7, x - 8)C. (x, y) -> (x - 4, x - 5)D. (x, y) -> (x - 5, y - 4) The adult blue whale has a lung capacity of 5.0103 L. Calculate the mass of air (assume an average molar mass 28.98 g/mol) contained in an adult blue whales lungs at 0.2 C and 1.04 atm, assuming the air behaves ideally. The average assembly time for a Ford Taurus is = 38 hrs. An engineer suggests that using a new adhesive to attach moldings will speed up the assembly process. The new adhesive was used for one month. During that month, the average assembly time for 36 cars was = 37.5 hours with a standard deviation s = 1.2 hours. Use = 0.01. Based on the calculated P-value will you reject or fail to reject the null hypothesis? Select one: a. reject the null hypothesis / data is significant b. fail to reject the null hypothesis c. cannot be determined 17. (a) What is the terminal voltage of a large 1.54-V carbon-zinc dry cell used in a physics lab to supply 2.00 A to a circuit, if the cells internal resistance is 0.100 ? (b) How much electrical power does the cell produce? (c) What power goes to its load? How long has bernie sanders been in the senate Forty percent of the homes constructed in the Quail Creek area include a security system. Three homes are selected at random: What is the probability all three of the selected homes have a security system A system of linear equations contains two equations with negative reciprocalslopes. Select all of the correct statements.OOA. The system will have two solutions.OB. The system will have one solution.O c. The system may have no solution.D. The system may have infinitely many solutions. A rock inclusion in a basalt lava flow is dated at 56 Ma. This means the lava flow must have occurred _______ 56 Ma. Vedic worshipthat is, the religion of the Vedas orchestrated by Brahmins--was primarily: fasting for a month, beginning at the new moon silent meditation and yogic practice solemn circular dances ritual offerings to the gods through fire sacrifice At what points on the given curve x = 4t3, y = 3 + 8t 10t2 does the tangent line have slope 1? x^y=y^x find derivitive Icd 10 code for diverticulitis of sigmoid colon