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

# CS310: Open Source Web Application Development Assignment No. 02 Spring 2017 Due Date:18/05/2017

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

Views: 669

.

+ 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

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

&

.... How to Find Your Subject Study Group & Join ....

any idea how to restrict user to input multiple of 100 and how to check if the input given by user is multiple of 100.????

idea solution

<?php

\$amount=37000;
if(\$amount> 0 && \$amount < 49900 && \$amount % 100 ==0 )
{
echo "Enter value[0-49900]: \$amount<br>";
echo "Valid Input<br>";
if(\$amount < 499)
{
\$n = \$amount / 100;
\$a = \$amount % 100;
echo '<br>Five Thousand : --- <br>';
echo 'One Thousand : ---<br>';
echo 'Five Hundred : ---<br>';
echo 'Hundred : '.intval(\$n);
}else if(\$amount < 999)
{
\$n = \$amount / 500;
\$a = \$amount % 500;
echo '<br>Five Thousand : ---<br>';
echo 'One Thousand : ---<br>';
echo 'Five hundred :'.intval(\$n).'<br>';

if(\$a != 0)
{
\$b = \$a/100;
echo 'Hundred :'.intval(\$b).'<br>';
}
}else if(\$amount < 4999)
{
\$n = \$amount / 1000;
\$a = \$amount % 1000;
echo '<br>Five Thousand : ---<br>';
echo 'Thousand :'.intval(\$n).'<br>';

if(\$a != 0)
{
\$b = \$a/500;
\$c = \$a % 500;

echo 'Five Hundred :'.intval(\$b).'<br>';

if(\$c != 0)
{
\$d = \$c/100;
echo 'Hundred :'.intval(\$d).'<br>';
}
}
}else if(\$amount <= 49900)
{
\$n = \$amount / 5000;
\$a = \$amount % 5000;
echo '<br>Five Thousand :'.intval(\$n).'<br>';

if(\$a != 0)
{
\$b = \$a/1000;
\$c = \$a % 1000;
echo 'Thousand :'.intval(\$b).'<br>';

if(\$c != 0)
{
\$d = \$c/500;
\$e = \$c % 500;
echo 'Five Hundred :'.intval(\$d).'<br>';
if(\$e != 0 )
{
\$f = \$e/100;
echo 'Hundred :'.intval(f).'<br>';
}
}
}
}

}
else
{
echo " Entered amount should be within the range and the multiple of 100";

}

?>

ye code to thek hai but output may total rupees hain wo string value may anay chaiye code to mai b ye kb ka bna chuka but string value ki smjh ni a ri

## Latest Activity

Saud and Sabahat Bukhari joined Virtual University of Pakistan
1 hour ago
1 hour ago
1 hour ago
1 hour ago
2 hours ago
3 hours ago
3 hours ago
3 hours ago

1

2

3