Prove the following theorems using truth table (a) X + XY = X (b) X + YZ = (X + Y)(X + Z)

Answers

Answer 1

Answer:

I attached you the answer in the picture

Explanation:

First, let's see the relationship between the logic gates and truth tables:

The operation of logic gates in relation to one another may be represented and analyzed using a branch of mathematics called Boolean Algebra which, like the common algebra, deals with manipulation of expressions to solve or simplify equations. Expressions used in Boolean Algebra are called, well, Boolean expressions.

AND Gate:

The AND gate is a logic gate that gives an output of '1' only when all of its inputs are '1'.  Thus, its output is '0' whenever at least one of its inputs is '0'. Mathematically, A∧B = A · B.

OR Gate:

The OR gate is a logic gate that gives an output of '0' only when all of its inputs are '0'. Thus, its output is '1' whenever at least one of its inputs is '1'. Mathematically, A∨B = A + B.

Having this in mind, we just need to use basic Mathematical Logic operations

Prove The Following Theorems Using Truth Table (a) X + XY = X (b) X + YZ = (X + Y)(X + Z)

Related Questions

As the screen’s size and resolution change, the _______________ property for a control automatically resizes the control.

Answers

Answer: Anchoring

Explanation: Anchoring is the property that helps in the controlling of resizing , position and maintaining the distance control. Anchor control will get activated when the screen of the system starts to change the resolution or the size of the screen.

The anchor control gets into action for the controlling the position in the vertical or horizontal direction or bottom of the form, distance managing according to the edges etc.

Due Friday by 11:59pm Points 100 Submitting a file upload Available after Aug 31 at 12am Challenge: Object Position Calculation Description: Write a Python 3 program called objectposncalc.py that accepts user input from the keyboard for the initial position, initial velocity, acceleration, and time that has passed and outputs the final position based on an equation provided in the requirements. Purpose: Provide experience with writing an interactiv

Answers

Answer:

#here is code in python.

#main method

def main():

#read the initial position

   in_pos=float(input("enter the initial position:"))

#read the initial velocity

   in_vel=float(input("enter the initial velocity:"))

#read the acceleration

   acc=float(input("enter the acceleration:"))

#read time

   time=float(input("enter the time:"))

# final position =x+ut+(at^2)/2

   fin_pos=in_pos+(in_vel*time)+(acc*(time**2)/2)

#print the final position

   print("final position is: ",fin_pos)

       

#call the main method    

main()

Explanation:

Read the initial position, initial velocity, acceleration and time from user.Then calculate final position as initial position+(initial velocity*time)+ (acceleration*time^2)/2. This equation will give the final position. print the final position.

Output:

enter the initial position:10

enter the initial velocity:20.5

enter the acceleration:5

enter the time:15

final position is:  880.0

Answer:

gy

Explanation:

A(n) _____ is the unit of network information NICs and switches work with.

Answers

Answer: Network card

Explanation:

 A network card is unit of the network information NIC (Network interface card) and worked with the switches. The working is basically perform at the given physical layer and subsequently organizing different types of devices that are physically associated together to execute as individual unit.  

The network interface card (NIC) is also known as network adapter and the ethernet card in the network. It is the expansion of the card that basically enable the computer system to connect with the networks.

Which of the following boolean algebra statements is true?

a) x & y = ~x | ~y
b) x | y | z = x & (y | z)
c) x | (y & z) = (x & y) | (x & z)
d) x & (y | z) = (x & y) | (x & z)

Answers

Answer:

The only statement that is True is the d) x & (y | z) = (x & y) | (x & z)

Explanation:

The statement x & (y | z) = (x & y) | (x & z) satisfies the Distributive Law of Boolean Algebra that states:

A & (B | C) = (A & B) | (A & C).

You can also check that the others are False if you use the operation notation, lets see that any of the other statements are true:

Statement a) x & y = ~x | ~y is equivalent to x * y=~x + ~y and this is False

Statement b) x | y | z = x & (y | z) is equivalent to x + y + z = x * (y + z), by solving this you have x + y + z = x * y + x * z and those expressions are not the same, so is False

For Statement c) x | (y & z) = (x & y) | (x & z) we have that this one does not satisfies the Distributive Law, therefore is False

________If your program compiles successfully, it will produce correct results. (T/F)

Answers

Answer:

False.

Explanation:

It is not compulsory that if the program is compiled successfully it will produce correct result.Suppose if the syntax in the code is all correct but the logic behind the code is wrong or there is a logic error in the program .So the program is certain to give wrong results.

Hence the answer is False.

Discuss the purpose of Javadoc.

Answers

Answer: Javadoc is type of tool that is used for reading the comments that are formatted in Java source code. It helps in the production of the Java code documentation from these java codes in the HTML(hyper test markup language).

The purpose it serves is changing the API documents into the HTML code documentation or HTML web pages.This service is used while programming takes place.

The if/else if statement is actually a form of the __________ if statement.

Answers

Answer:

The answer to this question is "nested".

Explanation:

The answer to this question is nested because, In programming languages, there is a concept of nested if-else statement. In nested if-else statement placing if statement inside another IF Statement that is known as nested If in C Programming.

Example of nested if can be given as

#include <stdio.h>

int main()

{

  int a,b,c;

printf("Enter 3 number\n");

scanf("%d",&a);

scanf("%d",&b);

scanf("%d",&c);

   if(a>b)

   {

    if(a>c)

    {

        printf("A is greater: %d",a);

    }

   }

   else

   {

       if(b>c)

       {

           printf("B is greater: %d",b);

       }

       else

       {

           printf("C is greater: %d",c);  

       }

   }

   return 0;

}

output:

Enter 3 number  

4

7

9

c is greater: 9

Write a class definition for a student. It should have student ID and student name. Include the mutator and accessor functions for both of those member variables.

Answers

Answer:

class student {

   private:

   int studentID;

   string student_name;

   public:

   int getID() // accessor...

   {

       return studentID;

   }

   string getname()  //accessor...

   {

       return student_name;

   }

   void setvalues(int ID,string name)  //mutator..

   {

       studentID=ID;

       student_name=name;

   }

};

Explanation:

The above written class is in C++.I have created two private members student_ID and student_name.Two accessor function getname and getID and one mutator function setvalues and these functions are public.

True or false? Colons are required when entering the MAC address into the Reservation window?

Answers

Answer:

False

Explanation:

A reservation in server-client communication is used to map your NIC’s MAC address to a particular IP address. A reserved MAC address should stay reserved until it gets to a point where a computer needs to get its address from DHCP. It should always remain static. To configure mac address in a DHCP console, you are required to use dashes to separate the MAC values. You can opt not to use dashes if you want to but do not use colons as separators. It will not work and will only populate errors.

how to determine if f(x)= -3x+4 from real numbers to real numbers is injective, surjective, or bijective

Answers

Answer:

The function is injective.

The function is surjective.

The function is bijective.

Explanation:

A function f(x) is injective if, and only if, a = b when f(a) = f(b).

So:

[tex]f(x) = -3x + 4[/tex]

[tex]f(a) = f(b)[/tex]

[tex]-3a + 4 = -3b + 4[/tex]

[tex]-3a = -3b[/tex] *(-1)

[tex]3a = 3b[/tex]

[tex]a = \frac{3b}{3}[/tex]

[tex]a = b[/tex]

Since [tex]f(a) = f(b)[/tex] if, and only if, [tex]a = b[/tex], the function is injective.

A function f(x) is surjective, if, and only if, for each value of y, there is a value of x such that f(x) = y.

Here we have:

[tex]f(x) = y[/tex]

[tex]y = -3x + 4[/tex]

[tex]3x = 4-y[/tex]

[tex]x = \frac{4 - y}{3}[/tex]

The domain of x is the real numbers, which means that for each value of y, there is a value of x such that [tex]f(x) = y[/tex]. So, the function is surjective.

A function f(x) is bijective when it is both injective and surjective. So this function is bijective.

Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
a. network infrastructure
b. SWOT
c. level of IT expertise
d. IT strategy

Answers

Answer: IT strategy

Explanation: IT(Information technology) strategy is the planning that is used in any particular organization for the  management of the resources, functions, operation etc to make sure that stakeholders, employees etc have the same aim of working. This method helps in sustainability and achieving the goals.

Other options are incorrect because network infrastructure is the structure made by the network nodes, SWOT(strength, weakness, opportunities and threats) analysis for the analyzation of organization or person, IT expertise level defines the stages persisting particular skills.Thus the correct option is IT strategy.

Which of the following is not a command for determining if MySQL is running on Linux (Ubuntu)?
(a) sudo service mysql status
(b) ps -ef | grep 'mysql'
(c) sudo check status mysql
(d) sudo systemctl status mysql

Answers

Answer:

(c) sudo check status mysql

Explanation:

The commands service, ps and systemctl, are different ways to find out if MySQL is running on Linux (Ubuntu), but there is not such a command called check to do so in Linux.

Different programs in Linux operating system are organized in processes, and they are all created for a specific purpose: running an application, starting a web browser, and so on.

Some other programs like the init program start and stop essential service processes and there are currently two major implementations in Linux distributions:

System V init (traditional implementation)systemd (emerging standard for init).

The commands service and systemctl are related to System V init and systemd, respectively, and can list the status of a program.

Thus, the command service can list if MySQL is running on Linux using the piece of code in the question: sudo service mysql status.

Likewise, the command systemctl can activate and deactivate services, and, among many other functionalities, list the status of a program (like the one in the question: systemctl status mysql).

The command ps (process status) "displays information about a selection of the active processes" [ps man page]. The command has many options, and some are -e (select all processes) and -f (full-format listing). In this case, the command output is piped to grep (global regular expression print) command to find those processes mainly related to 'mysql'.

It is important to remember that command sudo (superuser do) permits a user to "execute a command as the superuser or another user" [sudo man page], since commands service and systemctl require privileges to be run, for security reasons.

You get an error when trying to insert a record into a table from a Python script. A possible reason for this could be:

a

Malformed insert statement

b

Failure to connect to the database

c

No permission to insert into the table

d

All of these

Answers

Answer:

d) All of these.

Explanation:

When we get an error in inserting  a record in table using python script.There could be several reason for that which are as following:-

The insert statement in python can be not well formed.You don't have the permission to insert data in the table.Python is not able to connect to the database.

So all of the above written reasons are mentioned in the question hence the answer is option d.

. A collection of programs designed to create and manage databases is called a(n))

Answers

Answer:

Database Management System.

Explanation:

Database Management System is the collection of programs and data used to create ,define and manipulate the database.

There are several database management systems present and some of them are as following:-

RDBMS (Relational Database Management System)No SQL DBMSCDBMS(Columnar Database Management System).IMDBMS(In-Memory Database Management System).

What is the output produced from the following statements? (Treat tabs as aligning to every multiple of eight spaces.)

System.out.println("name\tage\theight");
System.out.println("Archie\t17\t5'9\"");
System.out.println("Betty\t17\t5'6\"");
System.out.println("Jughead\t16\t6'");
Expert Answer

Answers

Answer:

// this will be the output of the following statement.

name    age     height

Archie  17      5'9"

Betty   17      5'6"

Jughead 16      6'

Explanation:

First print statement will print name, age and height separated by a tab space. Then next print statement print Archie, 17 and 5'9"  separated by a tab space in new line.Similarly third print statement will print Betty, 17 and 5'6" and in new line the last print statement will print Jughead,16 and 6' separated by a tab space in the next line.

Implements the sequential search method that takes and array of integers and the item to be search as parameters and returns true if the item to be searched in the array, return false otherwise

Answers

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

   // function to perform sequential search

  public static boolean item_search(int [] arr,int k)

  {

      boolean flag=false;

      for(int a=0;a<arr.length;a++)

      {

       // if item found then return true,else false

          if (arr[a]==k)

          {

              flag=true;

              break;

          }

      }

      return flag;

  }

   // main method of the classs

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

{

   try{

    // variables

       int size,item;

 // scanner object to read input from user

Scanner scr=new Scanner(System.in);

//ask user to enter size

System.out.println("size of array:");

 // read the size of array

size=scr.nextInt();

 // create an array of given size

int inp_arr[]=new int[size];

System.out.println("enter the elements of array:");

 // read the elements of the array

for(int x=0;x<size;x++)

{

    inp_arr[x]=scr.nextInt();

}

System.out.println("enter the item to search:");

 // read the item to be searched

item=scr.nextInt();

 // call the function with array and item as arguments

System.out.println(item_search(inp_arr,item));

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the size of array.Then create an array of the given size.Read the elements of the array.Then read the item to be searched.Call the method item_search() with array and item as arguments.Here check all the elements, whether the item is equal to any of the element of array or not.If any element is equal to item then method will return true otherwise return false.

Output:

size of array:5

enter the elements of array:3 6 1 8 9

enter the item to search:8

true

What is the Matlab command to create a vector of the even whole numbers between 29 and 73?

Answers

Answer:

x = 29:73;

x_even = x(2:2:end);

Explanation:

In order to create a vector in Matlab you can use colon notation:

x = j:k

where j is 29 and k is 73 in your case:

x = 29:73

Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:

x_even = x(2:2:end);

In the line of code above, we define x_even as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.

If you want the odd numbers, just use the odd indices of your vector:

x_odd = x(1:2:end);

where x_odd contains all the elements of x with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.

Write a program that converts a temperature in Fahrenheit to temperature in Centigrade. The program will ask the user to enter a temperature in Fahrenheit as a decimal number. It will then display the same temperature in Centigrade as a decimal number. See Testing section below for test data.

Answers

Answer:

// here is program in java to convert Fahrenheit to equivalent Centigrade.

// import package

import java.util.*;

// class definition

class Main

{

   // main method of the class

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

{

   try{

    // object to read value from user

    Scanner scr=new Scanner(System.in);

    // ask to enter temperature in Fahrenheit

       System.out.print("enter rented minutes: ");

       // read temperature in Fahrenheit

       int temp_f=scr.nextInt();

       // convert Fahrenheit to Centigrade

       double cen=(temp_f-32)/1.8;

       // print the temperature

       System.out.println(temp_f+" Fahrenheit is equal to "+cen+" Centigrade");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read temperature in Fahrenheit from user and assign it to variable "temp_f". To convert the temperature to equivalent Centigrade, first subtract 32 from Fahrenheit and then divide it by 1.8 .This will give equivalent temperature in Centigrade.

Output:

enter rented minutes: 100

100 Fahrenheit is equal to 37.77777777777778 Centigrade

Jill uses Word to create an order form. She starts out by creating a table that has three columns and ten rows. She would like her first heading to span the width of the entire table. She does which of the following to accomplish her goal?: *
a. merges the top two cells
b. merges the top three cells
c. merges the top ten cells
d. widens the first cell

Answers

Answer: Jill will have to b) merge the top three cells so that her first heading can span the width of the entire table.

Explanation: If Jill merges the top two cells, one of the cells will still remain and therefore she will not be able to span the width of the entire table. She cannot merge the top ten cells because the problem states the has 3 columns. The 10 rows occupy the entire table and are not located at the top of the table. Jill could widen the first cell, however, it will limit her table to one large column and 10 rows. The problem states that only the first heading or row should be occupying the entire width, therefore b) merges the top three cells is the correct answer.

To make her first heading span the width of the entire table which has three columns, Jill should merge the top three cells. The correct option is b. merges the top three cells.

In Microsoft Word, when creating a table, if you want to make a single cell span across multiple columns, you use the merge cells feature. Since Jill's table has three columns, merging the top three cells will create one header cell that extends over the entire width of the table, allowing for a cohesive and clear heading. This is especially useful for providing a unified title or a single descriptive heading at the top of the columns. It's important to ensure that table header cell labels are concise and clear, with captions or descriptions that clearly articulate the table's purpose and organization. In this case, Jill's merged cell can serve as a label to help interpret the cells below in her order form table, making it both functional and visually appealing.

What is the return type of writeDouble( double d ), a method of RandomAccessFile.
a) void b) int c) float d) double f ) boolean g) file object h) none

Answers

Answer:

The answer is h) none.

Explanation:

The RandomAccessFile.writeDouble(double d) method does not return any value, it converts the double d value into a long type and then, writes it into a file as an eight-byte quantity. So, the method does not return any value but creates a file object.

-Define three types of user mode to kernel mode transfers?

Answers

Answer:

 The three types of user mode to the kernel mode transferred occurred due to the:

It is mainly occurred due to the interrupt when, it send to the central processing unit (CPU).It also occurs due to the hardware exception and when the memory is access illegally as it is divided by the zero. It is mainly implemented or executed by the trap instruction as the system are basically executed by the program.
Final answer:

User mode to kernel mode transfers can happen through system calls, hardware interrupts, and software interrupts, allowing a user-level program to request kernel-level operations.

Explanation:User Mode to Kernel Mode Transfers

In computer systems, user mode to kernel mode transfers can occur through three primary mechanisms. These are system calls, hardware interrupts, and software interrupts. A system call is a programmed request to the kernel for a service performed by the operating system that a normal user program is not allowed to do. This is an intended interaction. A hardware interrupt is an asynchronous signal from hardware to the processor requesting attention; it causes the CPU to switch from user mode to kernel mode to handle the event. Lastly, a software interrupt is triggered by executing a specific instruction which intentional causes the processor to enter kernel mode for executing low-level routines that are not accessible in user mode.

. How do you find and remove files whose names contain embedded spaces? What would the Linux command(s) be?

Answers

Answer:

The Linux command is find.

Explanation:

The Linux command find suffices for finding and removing files whose names contain embedded spaces.

The command find supports tests of different kinds and predefined (and user-defined) actions in conjunction like that one looking for files with embedded spaces and then delete them.

We can achieve this using the following piece of code (as example):

find . -regex '.* +.*' -delete

The command find will look for files in the current working directory ( . ), execute the test -regex, to evaluate files in the current directory using the case-sensitive regular expression test (regex) (it could be also -iregex) that evaluates those files having names with one or more embedded spaces ( +)  between zero or more characters before (.*) and after (.*) of these embedded space(s) ( +).  

Look carefully that one or more embedded spaces is (are) represented in regular expressions using a space before the metacharacter (+),  and characters are represented using the metacharacter (.) before (*), that is, (.*)

In other words, the quantifier (+) represents one or more occurrences (or matches) and quantifier metacharacter (*) zero or more times cases for that evaluation.

So, after testing all files available in the current directory with -regex test, find will execute the action -delete for all files matching the result of such an evaluation (and finally obtaining what we are looking for).

The command find has several other tests (-name, -iname, -ctime, and many more) that can be used with logical operators (-and, -or, -not), some predefined actions like -delete (aforementioned), -ls (list), -print and -quit, and also offers possibilities for user-defined actions, as mentioned before.

Write a complete Java program called Stewie2 that prints the following output. Use at least one static method besides main. ////////////////////// || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! || \\\\\\\\\\\\\\\\\\\\\\ || Victory is mine! ||

Answers

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

// main method of the class

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

{

   try{

    // declare and initialize string pattern

       String patt1="//////////////////////";

        // declare and initialize string pattern

       String patt2="|| Victory is mine! ||";

       // both patterns are printed alternatively

       for(int x=0;x<10;x++)

       {

        // first print pattern 1

           if(x%2==0)

           System.out.println(patt1);

            // then print second pattern

           else

           System.out.println(patt2);

       }

   }catch(Exception ex){

       return;}

}

}

Explanation:

Declare and initialize two strings patterns.As there are first pattern on every even line and second pattern on odd line. Run the loop for 10 time and print the pattern based on the position of lines.

Output:

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

//////////////////////

|| Victory is mine! ||

) Printing odd numbers. Write Python code that asks the user for a positive number, then prints all the odd numbers from 0 to the number provided by the user. For example, if the user provides the number 7, then you should print the values: 1 3 5 7 *You can use 'range()' with three numbers.

Answers

Answer:

#here is code in Python

#read the value of n

n=int(input("enter a number:"))

#print all the odd numbers

for i in range (1,n+1,2):

   print(i,end = '')

Explanation:

Read a number from user and assign it to variable "n".Then use a for loop to print all the odd numbers from 1 to n.We can use range() function to print this. here first number is starting of the range and second will be the end of the range. and 3rd one is the Increment to the iterator.

For example In the above code, 1 is the start point and n+1 will be the last. Here

loop will run till n only.Every time value of "i" is increased by 2.

Output:

enter a number:15

1 3 5 7 9 11 13 15

Which of the following can be used to get an integer value from the keyboard?

Integer.parseInt( stringVariable );
Convert.toInt( stringVariable );
Convert.parseInt( stringVariable );
Integer.toInt( stringVariable );

Answers

Answer:

Integer.parseInt( stringVariable );

Explanation:

This function is used to convert the string into integer in java .Following are the program that convert the string into integer in java .

public class Main

{

public static void main(String[] args)  // main method

{

 String num = "1056"; // string variable

int res = Integer.parseInt(num);  //convert into integer  

System.out.println(res); // display result

}

}

Output:1056

Therefore the correct answer is:Integer.parseInt( stringVariable );

Answer:

A

Explanation:

Convert 311 from decimal to hexadecimal. Show your work.

Answers

Answer:

(311)₁₀ = (137)₁₆

Explanation:

To convert a base 10 or decimal number to base 16 or hexadecimal number we have to repeatedly divide the decimal number by 16 until  it becomes zero and write the remainders in the reverse direction of obtaining them.

311/16 = 19 remainder=7

19/16=1 remainder = 3

1/16 remainder = 1

Writing the remainder in the reverse direction that is (137)₁₆.

Hence the answer is 137.

What are the uses of the tracrt and ping commands and what information is provided by each.

Answers

Answer:

The ping command is used to test the ability of a source computer to reach a specified destination computer. This command is used to verify if the sender computer can communicate with another computer or network device in the network.

The tracert command is used to show the details about the path sending a packet from the computer to whatever destination you specify.

Create an array from 0 to 10 by steps of 0.5

Answers

Answer:

#here is code in python

#import numpy library

import numpy as np

#create an array from 0 to 10 by steps of 0.5

ar=np.arange(0,10.5,0.5)

#print the array

print(ar)

Explanation:

Import the numpy library as alias "np".Then np.arange() function will call with three parameter to create an array.Here first parameter is start and goes till second parameter -increment.Here 3rd parameter is increment.It will create the array and assign it to "ar".Print the array.

Output:

[ 0.   0.5  1.   1.5  2.   2.5  3.   3.5  4.   4.5  5.

 5.5  6.   6.5 7.   7.5  8.   8.5  9.   9.5 10. ]

What is the value of each variable after execution?

int x = 2;

int y = 7;

double p = 7.0;

int z = y / x;

double w = p / x;

z:

w:

Answers

Answer:

The value of the following variable is given below:

x=2

y=7

p=7

z=3

w=3.5

Explanation:

Following are the program in c++

#include <iostream>// header file

using namespace std; // namespace

int main() // main function

{

int x = 2; // variable declaration

int y = 7; // variable declaration

double p = 7.0; // variable declaration

int z = y / x; // variable declaration

double w = p / x; // variable declaration

cout<<" The value of following variable is given as:"<<endl<<"x:"<<x<<endl<<"y:"<<y<<endl<<"p:"<<p<<endl<<"z:"<<z<<endl<<"w:"<<w;// print all the statement

return 0;

}

Output:

x:2

y:7

p:7

z:3

w:3.5

Here the variable x is initializes by 2 ,y is initializes by 7  and p is initializes by 7.The variable z=y/x gives 3 and variable w=p/x gives 3.5 because variable w is double type  

create a C program to read 3 unique(integer) numbers, find the largest and smallest numbers and print them to the screen. if the numbers are not unique, your program should print an appropriate message and exit. Otherwise, it should identify the smallest and largest numbers and print them to the screen.

Answers

Answer:

// here is code in C

#include <stdio.h>

// main function

int main(void) {

// variables

int a,b,c;

int mx,mn;

printf("Enter three numbers: ");

 // read the 3 numbers

scanf("%d %d %d",&a,&b,&c);

 // if all are not different

if(a==b||a==c||b==c)

{

    printf("all numbers are not different:");

}

// find the largest

else{

    if(a>b)

    {

        if(a>c)

        mx=a;

        else

        mx=c;

    }

    else{

        if(b>c)

        mx=b;

        else

        mx=c;

    }

// find the smallest

    if(a<b)

    {

        if(a<c)

        mn=a;

        else

        mn=c;

    }

    else{

        if(b<c)

        mn=b;

        else

        mn=c;

    }

}

// print largest and smallest

printf("largest of all is: %d \n",mx);

printf("smallest of all is: %d",mn);

return 0;

}

Explanation:

Read three numbers and assign them to variables "a","b" and "c" respectively. Check if all the numbers are different or not.If all are not different then print message "all are not different.".Otherwise find the largest and assign to "mx" and then find the smallest and assign to "mn".Print the largest and smallest of all three.

Output:

Enter three numbers:5 2 9

largest of all is: 9

smallest of all is: 2

Other Questions
Which two operations are needed to write the expression that represents "eight more than the product of a number and two"?multiplication and subtractiondivision and subtractionmultiplication and additiondivision and addition Which is NOT an effective way to resist unspoken peer pressure? Which of the following processes is responsible for releasing the energy captured during photosynthesis? Select one: a. Elimination b. Cellular Respiration c. Absorption d. Digestion e. Transpiration what is the fibonacci sequence? Select the most accurate response. Refrigerators and heat pumps are both systems which transfer energy from low-temperature reservoirs to high-temperature reservoirs, against the natural direction of heat transfer. The purpose of a refrigerator is to keep an enclosed space cool. The purpose of a heat pump is: Select one: a. to remove heat from a colder space b. to remove heat from a warmer space c. to supply heat to a colder space d. to supply heat to a warmer space john also bought a new ball. the new ball cost $300 which is three times the price of his old ball less $60. how much did he pay for his old ball? Why is wafting chemicals important? How many solutions does the equation have?|g| 8 = -3 NO SOLUTION, ONE SOLUTION, OR TWO SOLUTIONS( PICK WHICH ONE THX) Two airplanes leave an airport at the same time. The velocity of the first airplane is 740 m/h at a heading of 25.3. The velocity of the second is 570 m/h at a heading of 82.How far apart are they after 1.5 h? Answer in units of m. Which of the following is a true statement regarding physical activity and cardiovascular health? (Select all that apply.) Aerobic exercise increases resting heart rate because the heart pumps more blood while in a rested state. Aerobic exercise decreases resting heart rate because the heart has an increased stroke volume. Aerobic exercise reduces heart disease because it makes the heart work harder, improving its strength. Aerobic exercise increases LDL, or bad, cholesterol in the blood because blood ci MARK AS BRAINLIESTT!!!!!In cellular respiration, the steps following glycolysis depend on whether oxygen is present. Select the BEST explanation:A If oxygen is present, production of acetyl-CoA, the citric acid cycle, and electron transport chain follow in order. If no oxygen is present, photosynthesis occurs starting with Photosystem II.BIf oxygen is present, production of acetyl-CoA, the citric acid cycle, and electron transport chain follow in order. If no oxygen is present, either lactic acid fermentation or alcoholic fermentation follows.CIn the presence of oxygen, carbon fixation occurs during the Calvin cycle, when a carbon atom from atmospheric carbon dioxide is added to a 5-carbon sugar. DRegardless if oxygen is present or not, the production of acetyl-CoA, the citric acid cycle, and electron transport chain follow in order. SECOND QUESTION is the picture here are the answer choices if you can only see the picture.A. destroyed.B. absorbed.C. reflected.D. converted to heat. Explain the concept of detived demand. How does it affect marketing? Which of the following is a characteristic of a current liability?A current liability is due within one year or one operating cycle, whichever is longer.A current liability must be of a known amount.A current liability must be of an estimated amount.Current liabilities are subtracted from long-term liabilities on the balance sheet. What causes people to turn against their religion or beliefs? Write one paragraph Create a single line comment that says ""Print results to screen"" Classify each of the following financial statement items taken from Ming Corporations balance sheet. Classify each of the following financial statement Stockholders EquityLong-term InvestmentsCurrent AssetsIntangible AssetsLong-term LiabilitiesCurrent LiabilitiesProperty, Plant, and Equipment Accounts payable Classify each of the following financial statement Property, Plant, and EquipmentLong-term LiabilitiesStockholders EquityIntangible AssetsCurrent AssetsLong-term InvestmentsCurrent Liabilities Accounts receivable Classify each of the following financial statement Stockholders EquityCurrent AssetsProperty, Plant, and EquipmentLong-term LiabilitiesIntangible AssetsCurrent LiabilitiesLong-term Investments Accumulated depreciationequipment Classify each of the following financial statement Intangible AssetsCurrent AssetsStockholders EquityLong-term LiabilitiesProperty, Plant, and EquipmentCurrent LiabilitiesLong-term Investments Buildings Classify each of the following financial statement Current AssetsCurrent LiabilitiesIntangible AssetsLong-term InvestmentsLong-term LiabilitiesProperty, Plant, and EquipmentStockholders Equity Cash Classify each of the following financial statement Intangible AssetsCurrent AssetsLong-term InvestmentsCurrent LiabilitiesProperty, Plant, and EquipmentLong-term LiabilitiesStockholders Equity Interest payable Classify each of the following financial statement Current AssetsCurrent LiabilitiesLong-term InvestmentsLong-term LiabilitiesProperty, Plant, and EquipmentStockholders EquityIntangible Assets Goodwill Classify each of the following financial statement Intangible AssetsCurrent AssetsCurrent LiabilitiesProperty, Plant, and EquipmentLong-term InvestmentsLong-term LiabilitiesStockholders Equity Income taxes payable Classify each of the following financial statement Intangible AssetsProperty, Plant, and EquipmentLong-term LiabilitiesCurrent AssetsLong-term InvestmentsCurrent LiabilitiesStockholders Equity Inventory Classify each of the following financial statement Current LiabilitiesStockholders EquityIntangible AssetsLong-term LiabilitiesCurrent AssetsLong-term InvestmentsProperty, Plant, and Equipment Stock investments (to be sold in 7 months) Classify each of the following financial statement Long-term LiabilitiesLong-term InvestmentsProperty, Plant, and EquipmentCurrent AssetsIntangible AssetsStockholders EquityCurrent Liabilities Land (in use) Classify each of the following financial statement Long-term InvestmentsCurrent AssetsIntangible AssetsStockholders EquityCurrent LiabilitiesLong-term LiabilitiesProperty, Plant, and Equipment Mortgage payable Classify each of the following financial statement Current LiabilitiesLong-term InvestmentsLong-term LiabilitiesProperty, Plant, and EquipmentStockholders EquityIntangible AssetsCurrent Assets Supplies Classify each of the following financial statement Property, Plant, and EquipmentLong-term InvestmentsStockholders EquityLong-term LiabilitiesIntangible AssetsCurrent AssetsCurrent Liabilities Equipment Classify each of the following financial statement Long-term InvestmentsProperty, Plant, and EquipmentCurrent LiabilitiesLong-term LiabilitiesStockholders EquityIntangible AssetsCurrent Assets Prepaid rent which of the following issues was often a ploblem for local farmers in a colonized region ? Hector plays golf every Saturday. His wife, Alicia, notices that after a winning round, Hector tends to play with the kids. After a losing round, he tends to watch television by himself. According to ________ , over time, Alicia is likely to conclude that Hectors golf games can exert a causal effect on his behavior at home. Find the nth term of this number sequence18, 16, 14, 12,...Pls help Dr. Menteur runs a study in which infertile women are given injections of a synthetic hormone in hopes it will cause them to ovulate. Unknown to the women, the injections also contain a chemical that is hypothesized to increase the chance that fertilized eggs will implant in their uteruses. None of the participants experience any negative side effects from this second chemical, and more of the women become pregnant that in previous studies using just the hormone. The women are not paid for participating in the study, although they receive the treatment for no cost. This study is ethical, because the second chemical did not harm the women. Unethical, because the women were not informed injections would contain the second chemical. Ethical, because the second chemical increased the chance the participants would achieve their desired outcome. Unethical, because the women were not paid for their participation in the study.