Jump to content

Help me with some exercises


fratucci

Recommended Posts

QUESTION 1: Read two values, if variables A and B. Place the sum of variables A and B implying its result in the variable X. Present value of variable X after adding the two values.

QUESTION 2: The formula to calculate the area of a circle is A = pR2. Since the value of p = 3.14159 sufficient to establish: Read a value for radius, where the variable R. Perform the calculation of the area, boosting the value of R-squared and multiplying by p. Present value of variable A.

QUESTION 3: Read two variables A and B. Then calculate the product between them and assign the variable PROD. Then show the variable PROD with corresponding message.

Question 4: Read 2 variables A and B, which correspond to two notes of a student. Then calculate the average student, knowing that the note has a weight of 3.5 and a B weighs 7.5.

QUESTION 5: Make an algorithm that reads four variables A, B, C and D. Then, if B is greater than C, and D is greater than the sum of A and C to D is greater than the sum of A and B and C and D, respectively, are positive and if the variable is the pair write the message "accepted values" but write "values are not accepted".

 

I nee Help with those Php problems... i will need them solved till monday, because its my apliccatives final test day...

Could someone help me? i already solved the question 2.

 

<?php

function achararea ( $raio ){

$circulo = $raio * $raio ;

$area = pi () * $circulo ;

return $area ;

}

?>

 

Could someone help me with the others?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.