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


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

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

Share This With Friends......

+ Click Here To Join also Our facebook study Group.

This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


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


Views: 2902

See Your Saved Posts Timeline

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>
    <head>
        <title>Temp. Conv.</title>
    </head>
    <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 

RSS

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service