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?

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

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

Views: 675

.

+ 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

MIT joined + M.Tariq Malik's group

### CS411 Visual Programming

23 seconds ago
MIT joined + M.Tariq Malik's group

### CS610 Computer Network

27 seconds ago
MIT joined + M.Tariq Malik's group

### CS604 Operating Systems

1 minute ago
MIT joined + M.Tariq Malik's group

### MGT501 Human Resource Management

2 minutes ago
11 minutes ago
♦_"Tooba"_♦ liked + "AS"'s discussion Hum Mutmaein Buhat Hai...
12 minutes ago
♦_"Tooba"_♦ replied to + "AS"'s discussion Wo jo Khuwahishat...
13 minutes ago
♦_"Tooba"_♦ liked + "AS"'s discussion Wo jo Khuwahishat...
13 minutes ago
22 minutes ago
24 minutes ago
♦_"Tooba"_♦ liked + ! ! ! ! ! !blaire's blog post غار سجدہ
25 minutes ago
25 minutes ago
♦_"Tooba"_♦ liked Whispering Soul's discussion Mamu :D
26 minutes ago
♦_"Tooba"_♦ liked Biya's discussion Waqat Dolat Rishty. . .
27 minutes ago
♦_"Tooba"_♦ replied to Biya's discussion Waqat Dolat Rishty. . .
27 minutes ago
28 minutes ago
28 minutes ago
♦_"Tooba"_♦ liked Biya's discussion Khoob Sorat Bat. . . . .
36 minutes ago

58 minutes ago
2.O posted a discussion

3 hours ago

1

2

3