Write a program to read 2 numbers and display the largest of the two. You should use scanfto read the two numbers and use if statement to see which number is larger

Answers

Answer 1

Answer: in C

#include <stdio.h>

int main(){

  int num1, num2;

  printf("Enter first number :: ");

  scanf("%d", &num1);

  printf("Enter second number :: ");

  scanf("%d", &num2);

 

  if(num1 > num2){

     printf("%d is larger than %d\n", num1, num2);

  } else if (num2 > num1) {

     printf("%d is larger than %d\n", num2, num1);

  } else{

     printf("Both of them are equal\n");

  }

  return 0;

}


Related Questions

What are the advantages of using variables in a data type?

Answers

Answer:

A variable is a name associated with a data value; we say that the variable "stores" or "contains" the value. Variables allow us to store and manipulate data in our programs.

What are the key goal, performance, and risk indicators?

Answers

Answer:

KRIs are a way to quantify and monitor the biggest risks an organisation (or activity) is exposed to. By measuring the risks and their potential impact on business performance, organisations are able to create early warning systems that allow them to monitor, manage and mitigate key risks.

Effective KRIs help to:

Identify the biggest risks. Quantify those risks and their impact. Put risks into perspective by providing comparisons and benchmarks. Enable regular risk reporting and risk monitoring. Alert key people in advance of risks unfolding. Help people to manage and mitigate risks.

While KPIs help organisations understand how well they are doing in relation to their strategic plans, KRIs help them understand the risks involved and the likelihood of not delivering good outcomes in the future.

Many organizations have policies that require users to: a. retain their passwords for a minimum of 30 days. b. include at least three consecutive letters of part of their name in their passwords. c. change their passwords on a regular basis. d. share their passwords with the administrator.

Answers

Answer:

Explanation:

Answer is C. Change their passwords on a regular basis.

Final answer:

Many organizations have policies that require users to retain passwords, include their name in passwords, change passwords regularly, and not share passwords with administrators.

Explanation:

Many organizations have policies that require users to:

Retain their passwords for a minimum of 30 days.Include at least three consecutive letters of part of their name in their passwords.Change their passwords on a regular basis.Do not share their passwords with the administrator.

These password policies are aimed at enhancing security and reducing the risk of unauthorized access to sensitive information. By enforcing password retention, organizations ensure that users regularly update their passwords, which makes it harder for hackers to guess or crack them. Additionally, requiring users to include part of their name in their passwords increases the complexity and uniqueness of the passwords, further strengthening security.

Which of the following statements is false?

A Path object represents the location of a file or directory.

Path objects open files and provide file processing capabilities.

The Paths class is used to get a Path object representing a file or directory location.

The Path method isAbsolute returns false if the Path is relative.

Answers

Answer:

Path objects open files and provide file-processing capabilities. Actually, Path objects do not open files nor do they provide any file-processing capabilities. They specify only the location of a file or directory.

What is Expectation Gap?

Answers

Answer:

According to PakAccountants, "... Expectation gap is the term used to signify the difference in expectations of users of financial statements and auditor's expectation concerning audited financial statements."

“Auditing expectation gap or simply expectation gap is the term used to signify the difference in expectations of users of financial statements and auditor's expectation concerning audited financial statements.” - PakAccounts.com

Higher-speed Ethernet technologies use an electronic device known as a Hub rather than a switch True/False

Answers

this should be false

In the system implementation phase of the systems development life cycle​ (SDLC), with​ ________ installation, the organization implements the entire new​ system/business processes on a limited portion of the business. A) pilot B) phased C) parallel D) plunge

Answers

Answer:

The correct answer is (A. pilot)

A(n)__________, the heart of an information system, is a collection of all relevant facts organized in a series of integrated files.processSelectobjectproceduredatabase

Answers

Answer:

database

Explanation:

A _____ is a modeling tool used in structured systems analysis and design (SSAD) analysis model that helps break down a complex process into simpler, more manageable, and more understandable subprocesses

Answers

A "DATA FLOW DIAGRAM" is a modeling tool used in structured systems analysis and design (SSAD) analysis model that helps break down a complex process into simpler, more manageable, and more understandable subprocesses

Today, people working in cyberspace must deal with new and constantly evolving ________.

A. policy

B. risks

C. applications

D. threats

Answers

Am guess and say it’s B

How many hosts are in each subnet?

Answers

255.255.240.0 is a /20 subnet mask, therefore there are 4 borrowed bits (from the 3rd octet). Number of hosts on each subnetwork = (2 to the power 4) - 2 (i.e. 4 bits in host portion of address), which gives 14. So I got 16 subnetworks, and 14 hosts on each subnetwork.1

What is the role of the constructor for an object?

Answers

Answer:

A constructor is responsible for preparing the object for action.

Describe the components of the Ethernet frame in detail?

Answers

Starts with an Ethernet header, which contains destination and source MAC addresses as its first two fields

In the CRC checker at the receiver, the remainder that indicates error in the received data is:

a. a string of binary zeros

b. a string of binary ones

c. a string of alternating binary ones and zeros

d. not a string of binary zeros

Answers

B. A string of binary ones
A string of binary ones. Is the right answer

how might computers have a negative effect on the enviroment

Answers

Answer:

The negative effects of computer use on the environment There are several effects computer use has on the environment. Not only does it affect the environment but also human health.

Explanation:

First of all, sometimes people (especially in businesses) print unnecessary large amounts of files, emails or things from the internet which wastes paper and harms trees. People who use computers never really turn off the device which wastes electricity that could have been saved and reduce the amount of burning of fossil fuel.

Secondly, computers are made of heavy metals and dangerous chemicals. Heavy metals including Lead, Mercury,Beryllium,Cadmimum, PCV e.t.c

These metals and chemicals contribute to global warming because from these discarded computers it causes water contamination and air pollution.

Computers have negative effects on the environment, as heavy metals like lead and toxic chemicals found in computers contaminate groundwater and the environment.

What are the effects of computer?

The harm that using computers causes to the environment The use of computers has a variety of negative environmental effects. It has an impact on both the environment and human health.

First off, printing excessive amounts of files, emails, or other content from the internet can sometimes be done by people (especially in businesses), which wastes paper and puts a strain on the environment. People who use computers rarely turn them off, wasting energy that could have been saved and lowering the amount of fossil fuel burned.

Therefore, due to the contamination of groundwater and the environment by toxic chemicals and heavy metals like lead found in computers, computers have a negative impact on the environment.

To learn more about computers, refer to the below link:

https://brainly.com/question/23137168

#SPJ2

99 POINTS HELP ASAP PLEASE!!!
Select the mathematical statement that is true.
A.22 % 2 > −3
B.22 % 2 < 5
C.22 % 2 == 4
D.22 % 2 != 1

This is for my python coding class thank you

Answers

^ because 22 is even, it has a remained of 0

D

Answer:

D. 22 % 2 != 1

Explanation:

Since 22 is even than it would have to stay 0.

Therefore, your only answer choice would be D.

Consider a hypothetical hard drive that has 400,000 cylinders, 8 heads, and 128 sectors per track. Demonstrate, in writing, how you would calculate the total capacity of this drive. Assume a sector size of 512 bytes and express your answer in GBytes, to the nearest whole GByte, as defined in computer Science.

Answers

Answer:

The approximately capacity of a hard disk drive is 195 GB

Explanation:

sector = 512 B

Sector per track = 128 = 64 KB

cylinder = 8 * 128 (512 KB)

cylinders = 400,000 * 512 KB = 195.3 GB

1. When a program routine constantly looks a certain condition and executes a command when the condition is met, this is called:

a. Sampling

b. Polling

c.Interrupting

d. Triggering

Answers

This is Called Polling

A _____ is used by a host to forward IP packets that have destination addresses outside of the local subnet.

Answers

Ip packets are forwarded using the default gateway that is being used by the host.

Explanation:

Ip packets are forwarded using the default gateway that is being used by the host, where it has placed their destination addresses on the outside of the local subnet. The default router is another representation of the default gateway. It is also known as the default router. The computer sends the packets to the default router when it wishes to send to any other subnet. In-network this device is being a point of access to the other networks.

How do apps and devices call the OS?

Answers

OS will provide interface for an application to use, so an OS’s services as functions can be called from application programs (operating system acts as an intermediary between programs and the computer hardware)

Jack was shocked to witness the sudden drop in performance of his laptop. He also found that the screen saver constant changed and that the taskbar had disappeared. The given problems are symptoms of _____ infections. Select one: a. rootkit b. smishing c. phishing d. bootkit

Answers

Answer: bootkit

This is the answer because the hacker was not trying to get any private information, so a bootkit would be the correct answer. A bookit uses a program to basically destroy your computer from the inside, starting from the motherboard.

Hope this helps!

Hub is used in Twisted pair Ethernet. True/False

Answers

True or false, Answer:True

In cellular communication system the appropriate cell shape is circle True/False

Answers

Answer:

True

Explanation:

In cellular communication system the appropriate cell shape is circle.

A VPN: provides secure, encrypted communications using Telnet. is an Internet-based service for delivering voice communications. is an encrypted private network configured within a public network. is a proprietary networking service technology developed by individual corporations. is more expensive than a dedicated network.

Answers

Answer and Explanation:

VPN is an encrypted private network configured within a public network.

Typical applications are for employees accessing corporate network (private) through Internet (public).  Encryption and credentials contribute to security despite using a public network.

Which disc store compacity for full lenght movie? dvd or cd

Answers

DVDS have a lot more available bytes for use compared to a CD. Movies are typically take up a LOT of space- so DVDS are your best option

A file named data.txt contains an unknown number of lines, each consisting of a single integer. Write some code that creates two files, dataplus.txt and dataminus.txt, and copies all the lines of data1.txt that have positive integers to dataplus.txt, and all the lines of data1.txt that have negative integers to dataminus.txt. Zeros are not copied anywhere.

Answers

Answer:

I am doing it with python.

Explanation:

nums = '9 -8 -7 -6 -5 -4 -2 0 1 5 9 6 7 4'

myfile = open('data.txt', 'w')

myfile.write(nums)

myfile.close()

myfile = open('data.txt', 'r')

num1 = (myfile.read())

num1 = num1.split()

print(num1)

print(type(num1))

for x in num1:

   x = int(x)

   if x < 0:

       minus = open('dataminus.txt', 'a')

       minus.write(str(x) + ' ')

       minus.close()

   elif x>= 0:

       plus = open('dataplus.txt', 'a')

       plus.write(str(x)+' ')

       plus.close()

Answer:

#section 1

data = open('data.txt', 'r')

num = (data.read())

num = num.split()

data.close()

#section 2  

for x in num:

   x = int(x)

   if x < 0:

       minus = open('dataminus.txt', 'a')

       minus.write(str(x) + ' ')

       minus.close()

   elif x > 0:

       plus = open('dataplus.txt', 'a')

       plus.write(str(x)+' ')

       plus.close()

Explanation:

#section 1

A file data.txt containing an unknown number of lines each containing a single integer is opened.

The data is read from it and split to form a list from which the code will iterate over with a FOR loop and some conditional statements will be used to determine if the number is positive or negative.

#section 2

In this section two new files are created/ opened dataplus.txt and dataminus.txt and all the positive integers are stored in the dataplus.txt and the negative integers in the dataminus.txt.

The IF statement and elif statement used ensures that zero(0) is not captured ensuring that the code fulfills all the requirements in your question.

Explain what LIFO and FIFO mean, and how they are used in Abstract data types?

Answers

Answer:

LIFO stands for Last In First Out. This procedure is used in the Stacks in data structures.Stacks are the data types in which the data is stored called Stack.

Explanation:

What is the current competitive position of Nintendo?

Answers

Answer:

Sony and Microsoft

Explanation:

Answer:

Sony and Microsoft.

Explanation:

Xbox is nintendo's biggest competitor in the gaming industry with PS4 hitting Nintendo hard.

Hope I helped!

An icon can be specified for a tab using the _____ method.

addTab
setIcon
setImage
tabIcon

Answers

Answer:

setIcon

Explanation:

In design support library the components like nav bar, floating action button, snackbar, tabs, labels and animation frameworks we use icons and different other designs to look theme appealing.

So the icon can be specified for a tab using the setIcon method.

tabLayout.getTabAt(0).setIcon(tabIcons[0]);

tabLayout.getTabAt(1).setIcon(tabIcons[1]);

What is multiprogramming?

Answers

Answer:

Multiprogramming is a rudimentary form of parallel processing in which several programs are run at the same time on a uniprocessor. Since there is only one processor, there can be no true simultaneous execution of different programs. Instead, the operating system executes part of one program, then part of another, and so on. To the user it appears that all programs are executing at the same time.

Explanation:

Final answer:

Multiprogramming refers to a computer system running multiple programs at the same time by allocating system resources to multiple processes, maximizing CPU usage. It should not be confused with multitasking, which often relates to individuals performing several tasks simultaneously, a practice that can decrease efficiency if the tasks are complex.

Explanation:

Multiprogramming is a concept in computer science where a computer system runs multiple programs at the same time. This is achieved by having the operating system allocate resources to multiple processes in such a way that it maximizes CPU usage by switching between them. Each program is given a slice of the processor's time and then it is swapped out for another program, ensuring that the right amount of attention is given to each program without any one of them monopolizing the processor. This switching happens so quickly that it gives the illusion of programs running simultaneously.

While multiprogramming increases the efficiency of system resource utilization, it requires careful management of memory and CPU allocation to ensure that all programs get the necessary resources to operate effectively. It is different from multitasking, which generally refers to an individual performing several tasks at once, and often with variable success depending on the complexity of the tasks involved.

Moreover, in an agency or business context, multitasking can refer to an employee being given various roles or tasks and the need for incentives to guide not only the total effort of the employee but also the distribution of their time and effort across these tasks. This differentiation is important in designing incentives that are effective without negatively impacting the performance of the individual tasks.

Other Questions
what would you call 2 1 1 for Who were the main combatants in the French and Indian War?France against IndiansGreat Britain against IndiansGreat Britain against FranceGreat Britain against the French and their Indian allies When an 18-month-old throws a temper tantrum because he can't have a cookie, he is demonstrating that he has not yet developed: A traveler pulls on a suitcase strap at an angle 36 above the horizontal with a force of friction of 8 N with the floor. If 752 J of work are done by the strap while moving the suitcase a horizontal distance of 15 m, what is the tension in the strap? On July 7, you purchased 500 shares of Wagoneer, Inc. stock for $21 a share. On August 1, you sold 200 shares of this stock for $28 a share. You sold an additional 100 shares on August 17 at a price of $25 a share. The company declared a $0.95 per share dividend on August 4 to holders of record as of Wednesday, August 15. This dividend is payable on September 1. How much dividend income will you receive on September 1 as a result of your ownership of Wagoneer stock Which angle of rotation is an angle of rotational symmetry for all figures? If instead of saying, "Julian is afraid of the dark" you say, "Julian sees the boogieman lurking behindevery shadow," you are using Read an excerpt from "Television and the Public Interest" and answer the question. The speech was delivered by Newton N. Minow, chairman of the Federal Communications Commission, to the nations television executives in 1961. [1] But when television is bad, nothing is worse. I invite each of you to sit down in front of your television set when your station goes on the air and stay there, for a day, without a book, without a magazine, without a newspaper, without a profit and loss sheet or a rating book to distract you. Keep your eyes glued to that set until the station signs off. I can assure you that what you will observe is a vast wasteland. [2] You will see a procession of game shows, formula comedies about totally unbelievable families, blood and thunder, mayhem, violence, sadism, murder, western bad men, western good men, private eyes, gangsters, more violence, and cartoons. And endlessly, commercialsmany screaming, cajoling, and offending. And most of all, boredom. True, you'll see a few things you will enjoy. But they will be very, very few. And if you think I exaggerate, I only ask you to try it. [3] Is there one person in this room who claims that broadcasting can't do better? Well a glance at next season's proposed programming can give us little heart. Of 73 and 1/2 hours of prime evening time, the networks have tentatively scheduled 59 hours of categories of action-adventure, situation comedy, variety, quiz, and movies. Is there one network president in this room who claims he can't do better? [4] The best estimates indicate that during the hours of 5 to 6 P.M. sixty percent of your audience is composed of children under twelve. And most young children today, believe it or not, spend as much time watching television as they do in the schoolroom. I repeatlet that sink in, ladies and gentlemenmost young children today spend as much time watching television as they do in the schoolroom. It used to be said that there were three great influences on a child: home, school, and church. Today, there is a fourth great influence, and you ladies and gentlemen in this room control it. [5] If parents, teachers, and ministers conducted their responsibilities by following the ratings, children would have a steady diet of ice cream, school holidays, and no Sunday school. What about your responsibilities? Is there no room on television to teach, to inform, to uplift, to stretch, to enlarge the capacities of our children? Is there no room for programs deepening their understanding of children in other lands? There are some fine children's shows, but they are drowned out in the massive doses of cartoons, violence, and more violence. Must these be your trademarks? Search your consciences and see if you cannot offer more to your young beneficiaries whose future you guide so many hours each and every day [6] You must provide a wider range of choices, more diversity, more alternatives. It is not enough to cater to the nation's whims; you must also serve the nation's needs. And I would add this: that if some of you persist in a relentless search for the highest rating and the lowest common denominator, you may very well lose your audience. Because the people are wise, wiser than some of the broadcastersand politiciansthink. Select the two sentences that support the argument that television should not merely entertain audiences. "And endlessly, commercialsmany screaming, cajoling, and offending. And most of all, boredom." (paragraph 2) "Today, there is a fourth great influence, and you ladies and gentlemen in this room control it." (paragraph 4) "Search your consciences and see if you cannot offer more to your young beneficiaries whose future you guide so many hours each and every day " (paragraph 5) "It is not enough to cater to the nation's whims; you must also serve the nation's needs." (paragraph 6) "Because the people are wise, wiser than some of the broadcastersand politiciansthink." (paragraph 6) A stone is dropped from the upper observation deck of a tower, 250 m above the ground. (Assume g = 9.8 m/s2.) (a) Find the distance (in meters) of the stone above ground level at time t. h(t) = (b) How long does it take the stone to reach the ground? (Round your answer to two decimal places.) s (c) With what velocity does it strike the ground? (Round your answer to one decimal place.) m/s (d) If the stone is thrown downward with a speed of 2 m/s, how long does it take to reach the ground? (Round your answer to two decimal places.) s What is the y-value in the solution to this system of linear equations?4x + 5y = 12-2x + 3y = 16A.)4B.)2c.)2D.)5 Question 6 of 102 PointsWhich situation shows a constant rate of change?OA. The number of tickets sold compared with the number of minutesbefore a football gameOB. The height of a bird over timeOc. The cost of a bunch of grapes compared with its weightOD. The outside temperature compared with the time of day A person who is biologically female but identifies with the male gender and has undergone surgery to alter her body is considered _______.transgendertranssexuala cross-dresserhomosexual what is m angle ABC Children in peripheral nations have little to no daily access to computers and the Internet, while children in core nations are constantly exposed to this technology. This is an example of:the digital dividehuman ecologymodernization theorydependency theory Evaluate[32+ (7.6 - 22)] - [30 = (4 + 1)] Which of the following is NOT a possible value of the correlation coefficient? A. negative 0.9 B. zero C. positive 0.15 D. positive 1.5 E. negative .05 What is an example of a functional organizational structure? Find an nth degree polynomial function calculator n=4 -1,3,2+4i are zeros after World War I how did New theories about science differ from past ideas Group work will help you make self-discoveriesTrue