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

# 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: 654

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

Ibrahim Pasha updated their profile
24 minutes ago
2 hours ago
Razia Zahid joined + M.Tariq Malik's group

### PSY403 Social Psychology

2 hours ago
+ ѕιℓєиzισ liked + !!! "AS"'s discussion Naseeb ko Jhutla Na Sake ...
3 hours ago
+ ѕιℓєиzισ liked + ✦ S α ɾ α K ԋ α ɳ✦'s blog post میں شکر کیوں نہ کروں..؟؟
4 hours ago
5 hours ago
FiTGuY updated their profile
5 hours ago
Muhammad Rais joined + M.Tariq Malik's group

### MGMT631 Enterprise Resource Planning

5 hours ago
6 hours ago
ღ*`* Zainab *`*ღ joined + M.Tariq Malik's group

### CS403 Database Management Systems

6 hours ago
6 hours ago
Areeba joined + M.Tariq Malik's group

6 hours ago

1

2

3