 We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

# www.vustudents.ning.com

Looking For Something at vustudents.ning.com? Click Here to Search

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# CS508- Modern Programming Languages Assignment No. 04 SEMESTER Fall 2015 Total Marks: 20 Due Date: 15/02/2016

+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..

..How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?..

See Your Saved Posts Timeline

Views: 2915

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

Attachments:

### Replies to This Discussion

Hi,

Can anyone explain second question statement? Would be better; if with an example.... :)

Write a PHP program which defines a user defined function, the function calculates and display the retail price and Sale tax of a Book. The sale tax and profit is passed to the function as arguments, consider that the retail price of a product is the sum of cost price, profit and sale tax.

I don't understand; how to calculate retail price and tax....

done!

how to calculate retail price cost price is not defined ?

Please kese ne solve ki hy to idea solution he share kr do

Question no 01 idea soution:

<?php

function fahrenheit_to_celsius(\$given_value)
{
\$celsius=5/9*(\$given_value-32);
return \$celsius ;
}

function celsius_to_fahrenheit(\$given_value)
{
\$fahrenheit=\$given_value*9/5+32;
return \$fahrenheit ;
}

?>

<html>
<title>Temp. Conv.</title>
<body>
<form action="" method="post">
<table>

<tr>
<td>
<select name="first_temp_type_name">
<option value="fahrenheit">Fahrenheit</option>
<option value="celsius">Celsius</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="text" name="given_value">
</td>
</tr>
<tr>
<td>
<select name="second_temp_type_name">
<option value="fahrenheit">Fahrenheit</option>
<option value="celsius">Celsius</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="submit" name="btn" value="Convert">
</td>
</tr>
<tr>
<td>
<?php
if(isset(\$_POST['btn']))
{
\$first_temp_type_name=\$_POST['first_temp_type_name'];
\$second_temp_type_name=\$_POST['second_temp_type_name'];
\$given_value=\$_POST['given_value'];
if(\$first_temp_type_name=='fahrenheit')
{
\$celsious=fahrenheit_to_celsius(\$given_value);
echo "Fahrenheit \$given_value = \$celsious Celsious";
}
if(\$first_temp_type_name=='celsius')
{
\$fahrenheit=celsius_to_fahrenheit(\$given_value);
echo "Celsious  \$given_value = \$fahrenheit Fahrenheit";
}

}

?>
</td>
</tr>
</table>
</form>
</body>
</html>

compile this code at:

http://phpfiddle.org/

Thanks u

plz complete solution upload kro yar?????????/

plz conmplt solution den

q1 aur q2 ka solution upload karo koiiiiiiiiiii.

#Bint-e-Asif Its copy from net :) btw thnku