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
adoni [48]
3 years ago
6

For the function definition int SomeFunc( /* in */ int alpha, /* in */ int beta ) { int gamma; alpha = alpha + beta; gamma = 2 *

alpha; return gamma; } what is the function postcondition?
Computers and Technology
2 answers:
Sonbull [250]3 years ago
3 0

Answer:

A function post-condition refers to what will happen  and return after calling the function.

Given the function definition as follows:

  1. int SomeFunc( /* in */ int alpha, /* in */ int beta )
  2. {
  3.    int gamma;
  4.    alpha = alpha + beta;
  5.    gamma = 2 * alpha;
  6.    return gamma;
  7. }

If we call the function by passing two values, 3 and 4, as input parameters, the 3 will be captured by alpha and 4 by beta. The two input values will by calculated based on the formula defined inside the function as follows:

alpha = 3 + 4 = 7

gamma = 2 * 7 = 14

At last the function will return 14.

lbvjy [14]3 years ago
3 0

Answer:

function value == 2*([email protected] + [email protected])

Explanation:

int SomeFunc( /*in */ int alpha,  /* in */ int beta )

{

int gamma;

alpha = alpha + beta;

gamma = 2 * alpha;

return gamma;

}

The post-condition is useful for testing purposes. It represents what value the function SomFunc is expected to return at the time of program execution in a simplified manner.

For the given problem the post-condition is

function value == 2*([email protected] + [email protected])

Where @entry represents the value of alpha and beta at the moment when the function was called.

Note:  /*in */  it represents comment in c++ language and is ignored by the compiler

You might be interested in
Write a lottery program that will ask the user if they would like to pick 5 numbers (1-30) or if they would like to choose EZ Pi
Llana [10]

Answer:

Explanation:

The following code is written in Python and creates arrays for the user's numbers and the next chance numbers, it also creates a cost variable and a did_you_win variable. The function takes in the winning numbers as an array parameter. It asks all the necessary questions to generate data for all the variables and then compares the user's numbers to the winning numbers in order to detect if the user has won. Finally, it prints all the necessary information.

import random

def lottery(winning_numbers):

   user_numbers = []

   next_chance_drawing = []

   cost = 0

   did_you_win = "No"

   #print("Would you like to choose your own 5 numbers? Y or N")

   answer = input("Would you like to choose your own 5 numbers? Y or N: ")

   if answer.capitalize() == "Y":

       for x in range(5):

           user_numbers.append(input("Enter number " + str(x+1) + ": "))

   else:

       for x in range(5):

           user_numbers.append(random.randint(0,31))

           cost += 1

   next_chance = input("Would you like to enter a Next Chance drawing for $1.00? Y or N: ")

   if next_chance.capitalize() == "Y":

       for x in range(4):

           next_chance_drawing.append(random.randint(0, 31))

           cost += 1

           

   if user_numbers == winning_numbers or next_chance_drawing == winning_numbers:

       did_you_win = "Yes"

   print("User Numbers: " + str(user_numbers))

   print("Next Chance Numbers: " + str(next_chance_drawing))

   print("Cost: $" + str(cost))

   print("Did you win: " + did_you_win)

6 0
2 years ago
Who was making the high-pitched growling noise that Francisco hears?
Gwar [14]

The high-pitched growling noise that Francisco hears is due to mating call of male midshipman fish or 5G.

<h3>What is the  hum about?</h3>

The Hum is known to be a kind of unexplained happenings that has brought a lot of irritations to people. It is known to be a high-pitched noise that brought a lot of scientific theories.

Studies has shown that the high-pitched growling noise that Francisco hears is as a result of  mating call of male midshipman fish or 5G.

Learn more about noise from

brainly.com/question/2278957

8 0
2 years ago
Describe the Order of Operations in Java programming.
cestrela7 [59]

Answer:

It stands for Parentheses, Exponents, Multiplication/Division, Addition/Subtraction. PEMDAS is often expanded to the mnemonic "Please Excuse My Dear Aunt Sally" in schools. Canada and New Zealand use BEDMAS, standing for Brackets, Exponents, Division/Multiplication, Addition/Subtraction.

5 0
2 years ago
Describe FIVE significant advantages of web-based applications for an organisation.
masya89 [10]

Answer

There are a lot of advantages of web based applications.

Explanation:

Below are the advantages:

  1. Web based applications can be accessed from device that is connected to the device.
  2. No physical software required to download, install, update or manage which saves a lot of administration work for large companies.
  3. Web based software is compatible with any device or platform. The software is delivered through a browser of the users' choice.
  4. Mobile device applications allow for access to the software when out of the office.
  5. Direct access to latest information for Employees where every they are located.

Apart from these, there are lot more benefits, like quick and easy updates, centralized data where data is secure and easy to backup.  We can reach anybody, anywhere in the world.

Business costs are drastically reduced by spending less time talking to customers over the phone.

Online training can be finished at user's own time and risk.

It's available 24 hours a day, 7 days a week

The software is always up-to-date

8 0
2 years ago
Visit the target Let Me Discover page and review the history of HTML. Also, search the internet for the history of the internet
Lyrx [107]

Whether you are a novice, hoping to delve into the world of web design or an experienced webmaster keen to improve your skills, we’ve got online tutorials tailored to your web design needs.


Our HTML For Absolute Beginners will turn you from wannabe to webmaster in just a few hours. Unlike many other HTML tutorials, it's a step-by-step guide – not a boring long-winded reference.


Our step-by-step guide teaches you the basics of HTML and how to build your first website. That means how to layout an HTML page, how to add text and images, how to add headings and text formatting, and how to use tables.

use this because that is cheating no offence

3 0
3 years ago
Other questions:
  • What CLI command can be issued in CentOS 7 to help you to see every "hop" that a connection makes, including all of the switches
    13·1 answer
  • How do you ask someone for help?
    6·1 answer
  • You are creating a budget for your new business.What should you include
    15·1 answer
  • What exactly does the value recorded in a single dimension of a sift keypoint descriptor signify?
    15·1 answer
  • What are issues to consider when deciding to build software in-house or purchase commercial off-the-shelf software (cots)?
    14·1 answer
  • Which would increase electric current? increasing the resistance increasing the size of the wire decreasing the voltage
    6·1 answer
  • ​User documentation _____. Group of answer choices ​allows users to prepare overall documentation, such as process descriptions
    9·1 answer
  • An F-1 ____________ may be authorized by the DSO to participate in a curricular practical training program that is an__________
    8·1 answer
  • Write a test program that prompts the user to enter three sides of the triangle (make sure they define an actual triangle), a co
    5·1 answer
  • he attributes for an iframe are controlled by CSS. One of the iframe controls is "seamless." This means it _____. will blend the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!