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]
4 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]4 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]4 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
Demons I shall be your eternal nightmare
GuDViN [60]
What does this mean??? Should I be scared right now? Just kidding I’m not scared. Hope you’re not trying to cause harm. Hope you have a positive day and happy Thanksgiving to you and your family
8 0
3 years ago
Assume variables SimpleWriter out and int n are already declared in each case. Write a while loop that printsA. All squares less
REY [17]

Answer:

This program has been written using JAVA. The code is written beloe:

// import library

import java.util.Scanner;

public category Main operate

public static void main(String[] args)

{

// scanner category

Scanner scan=new Scanner(System.in);

System.out.println("Enter Number:");

int n=scan.nextInt();

//All squares but n

System.out.println("All squares but n are: ");

int temp=0,square=0,i=0;

while(square

range

square=i*i;

if(square>=n)break;

System.out.print(square+" ");

i++;

}

//All positive numbers that are divisible by 10 but less than n

System.out.println(" ");

System.out.println(" ");

System.out.println("All positive numbers are divisible by 10 and less than n are: ");

i=1;

while(i

{

if(i%10==0)

System.out.print(i+" ");

if(i>=n)break;

i++;

}

System.out.println(" ");

System.out.println(" ");

System.out.println("All powers of 2 that are less than n are: ");

//All powers of 2 less than n

i=0;

while(i

mathematics.pow(2, i);

if(num_power

System.out.print(num_power+" ");

i++;

}

}

}

Explanation:

With SimpleWriter out and int n already declared in each case this program makes use of a while loop condition to satisfy the following;

1. All squares less than n

2. positive numbers that are divisible by 10 and less than n.

3. All powers of two less than n.

5 0
3 years ago
In the Dynamic Partitioning technique of memory management, the placement algorithm that scans memory from the location of the l
Shtirlitz [24]

Answer:

best-fit

Explanation:

Best-fit: Closest in size to the request: In the Dynamic Partitioning technique of memory management, the placement algorithm that scans memory from the location of the last placement and chooses the next available block that is large enough to satisfy the request

3 0
3 years ago
Can I change my brainly username?
Stells [14]

no im pretty sure you cant


5 0
4 years ago
Read 2 more answers
Which of these would be the fastest transition duration?
allochka39001 [22]

The answer to your question simply would be 01.50

3 0
2 years ago
Read 2 more answers
Other questions:
  • Add the following functions to the code:
    9·1 answer
  • Word 2013 in order to share a document online you must first
    10·1 answer
  • The program used to create the file where you want to insert the object is called the ____.
    12·1 answer
  • What is the output after running the following code snippet? int number = 600; if (number < 200) { System.out.println("Low sp
    15·1 answer
  • Next, go to the mw_tour.html file. Within the document head, create links to the mw_layout.css and mw_styles.css style sheet fil
    10·1 answer
  • Small data files that are deposited on a user's hard disk when they visit a website are called _______.
    6·2 answers
  • क) मानौं तिमी बसेको समाजमा मान्छेहरूले सधै फोहर फाल्ने गर्नाले वातावरण प्रदूषित
    13·1 answer
  • You’ve found the file you’ll be working with. Next, you decide to move
    13·1 answer
  • Could you give me Aidan Gallagher's wuasp number​
    5·2 answers
  • Match each type of video camera to its features:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!