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
https://forums.phpfreaks.com/topic/219293-help-me-with-some-exercises/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.