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

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

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

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

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

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

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 2940

.

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

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

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

## Latest Activity

1 minute ago
1 minute ago
1 minute ago
+ M.Tariq Malik added a discussion to the group MCD403 Music Production

### MCD403 Music Production GDB Fall 2019 Solution & Discussion

2 minutes ago
3 minutes ago
5 minutes ago
+ M.Tariq Malik added a discussion to the group MTH634 Topology

### MTH634 Topology Assignment No 02 Fall 2019 Solution & Discussion:

6 minutes ago
Aniqa replied to Ayesha Noor's discussion Mohabbat...
6 minutes ago
7 minutes ago
Aniqa liked Ayesha Noor's discussion Mohabbat...
7 minutes ago
8 minutes ago
ہاشم replied to Muhammad Azam's discussion mth401 assignment 2
8 minutes ago

1

2

3