1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Murljashka [212]
3 years ago
7

2.8 Code Practice: Question 1

Computers and Technology
2 answers:
likoan [24]3 years ago
6 0

Input: A = 2, B = 8, C = 1

Output: Largest number = 8

-BARSIC- [3]3 years ago
4 0

Answer:

The program to this question can be given as:

Program:

#include <stdio.h> //define header file

int main() //define main method.

{

int a1,b1,c1; //define variable

printf("Enter three numbers:\n"); //message

scanf("%d",&a1); //input numbers.

scanf("%d",&b1);//input numbers.

scanf("%d",&c1);//input numbers.

if (a1>b1) //check condition

{

//check condition

if(a1>c1)//inner if block

{

printf("The largest number: %d", a1); //message

}

else  //inner else block

{

printf("The largest number: %d", c1);//message

}

}

else //else block

{

//check condition

if(b1>c1) //inner if block.

{

printf("The largest number: %d", b1);//message

}

else //else block

{

printf("The largest number: %d",c1);//message

}

}

return 0;  //return 0.

}

Output:

Enter three numbers:

22

44

11

The largest number: 44

Explanation:

The description of the above program can be given as:

  • In the C language program firstly we define the header file. Then we define the main function. In the main function, we define three variables that are "a1, b1 and c1". In this variable, we take input from the user.
  • Then we define the conditional statements. In the if block we check if the value of a1 is greater then the value of b1 if this condition is true so we use another condition that if the value of a1 is greater then the value of c1. so, it will print the largest value. If the above condition is not true then it will go to else section.
  • In the else part we check the condition that if the value of b1 is greater then the value of c1. if it is true it will print the largest number value.  
You might be interested in
How do companies use LinkedIn ?
Semenov [28]

Answer:

  1. Introducing new products or services you’ve developed.
  2. Differentiating yourself from your competitors.
  3. Finding job candidates who can make a significant contribution to your business success.
  4. Checking on what your competition is doing.
  5. Improving your ranking in search engines.
8 0
3 years ago
Read 2 more answers
What determines WiFi speeds, please list all your answers and explain how it affects the WiFi speed.
soldi70 [24.7K]
It’s hz and bandwidth, 5ghz is better then a 2.5ghz but the wavelength is more condensed so it won’t travel so far so the 5ghz will be faster but the 2.5ghz will go further.
8 0
2 years ago
Question Workspace Check My Work Copying computer software, video games, movies, or music without paying the producer for them i
Tcecarenko [31]

Answer:

Option B, CUSTOMER MISBEHAVIOR.

Explanation:

Consumer misbehavior can defined as the behavioral acts by consumers which violate the generally accepted norms of conduct in consumption situations, and disrupt the order expected in such situations. Misbehavior by consumers disrupts the openness, impersonal trust, and orderliness of the exchange environment.

Some of the examples of customer misbehavior are: shoplifting, bending rules, breaking rules by ignoring warnings and using products in forbidden or ways not recommended...

* Routinized response behaviour is a type of purchasing scenario whereby the purchaser of a product or a service has past experience with purchasing it and automatically makes the decision to purchase again.

* Psychological influences refers to the workings of the mind or psyche that influences customer decisions.

* Social influences refers to the intentional and unintentional efforts to change another person's beliefs, attitudes, or behavior.

Therefore, the option that best suits the question is option B, CUSTOMER MISBEHAVIOR.

3 0
3 years ago
g Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Algorithm. Give an example for
Papessa [141]

Answer:

e(a) = 0

e(b) = 10

e(c) = 110

e(d) = 1110

Explanation:

The Worst case will happen when f(a) > 2*f(b) ; f(b) > 2*f(c) ; f(c) > 2*f(d) ; f(d) > 2*f(e) and f(e) > 2*f(f).

Where f(x) is frequency of character x.

Lets consider the scenario when

f(a) = 0.555, f(b) = 0.25, f(c) = 0.12, f(d) = 0.05, f(e) = 0.02 and f(f) = 0.005

Please see attachment for image showing the steps of construction of Huffman tree:- see attachment

From the Huffman tree created, we can see that endcoding e() of each character are as follows:-

e(a) = 0

e(b) = 10

e(c) = 110

e(d) = 1110

e(e) = 11110

e(f) = 11111

So we can see that maximum length of encoding is 5 in this case.

3 0
2 years ago
What platform was PlayerUnknown’s Battlegrounds release on in March of 2018?
sveticcg [70]

Solution:

The game was released for Microsoft Windows via Steam’s early access beta program in March 2017, with a full release on December 20, 2017. That same month, the game was released by Microsoft Studios for the Xbox One via its Xbox Game Preview program, and officially released in September 2018. In early 2018, it was localized and released by Tencent Games in China, while two mobile versions based on the game for Android and iOS were also released. The game is one of the best-selling of all time, with over fifty million sold across all platforms by June 2018. In addition, the Windows version holds a peak concurrent player count of over three million on Steam, which is an all-time high on the platform.

Battlegrounds presented new types of gameplay that could be easily approached by players of any skill level and was highly replay-able. The game received several Game of the Year nominations among other accolades, and is considered by Greene to be the defining game of the battle royal genre. Several other video games, following in Battleground’s success, added battle royal-style modes, while a number of clones, primarily out of China, also appeared. PUBG Corporation has run several small tournaments and introduced in-game tools to help with broadcasting the game to spectators, as they wish for it to become a popular eSport.

Loot boxes! More loot boxes! Locked loot boxes! Selling loot boxes! Cheating for loot boxes! This has been the story of player Battleground for a few months since developer PUBG Corp (a division of Blue hole) has slowed down on making their flagship game better.


4 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following is a template definition?
    5·1 answer
  • 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sideb
    14·1 answer
  • How fast is a backwards long jump in Super Mario 64?
    7·1 answer
  • Availability is an essential part of ________ security, and user behavior analysis and application analysis provide the data nee
    14·1 answer
  • What is the difference between a try block and a try statement? Group of answer choices There is no difference; the terms can be
    6·1 answer
  • Lines s, t, and u are perpendicular bisectors of the sides FGH and meet at J. If JG=2x+2, JH=2y-4, JF=8 and HI=3z-3, find x, y,
    15·2 answers
  • The type of medium used to hide data in steganography is referred to as __________. This may be a photo, video, sound file, or V
    12·2 answers
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·1 answer
  • What is the second row of letters in the keyboard called?
    6·1 answer
  • The term embedded system refers to any device that includes a computer chip, but that is not a general-purpose workstation, desk
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!