+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More




Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:


  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Assignment is copied(partial or full) from any source (websites, forums, students, etc)


Note: You have to upload only .php file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks.




The objective of this assignment is to provide hands on experience of:


  • Perform arithmetic operations
  • Use of conditional statements


For any query about the assignment, contact at cs310@vu.edu.pk


















A person is on a Bank’s ATM machine to withdraw an amount. The amount should be within a range of 0 to 49900 and the multiple of 100. In case user enters an amount, which is not the multiple of 100 or out of range then an error message “Entered amount should be within a range and the multiple of 100” is displayed and no further processing is done otherwise a message “Valid Input” is displayed. After the verification of input value. Application counts how many five thousand, one thousand, five hundred and one hundred notes are to be given to the user in response of entered value. Remember notes count should be displayed in words not in digit as shown in the sample output.


Your task is to write a program to implement the above scenario and provide the output as shown in sample output. Assign input value to the variable instead of taking input from the user.



Always assign the input value to the variable, so suppose a value 27900/- is assigned. I should receive 5 notes of five thousand, two notes of one thousand, one note of five hundred and four notes of one hundred.


Hint: Read a description of a PHP function intval. You may need to use this function.


Sample Output:


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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 729


Replies to This Discussion

Please Discuss here about this assignment.Thanks

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>>



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.

Or visit this link 

Click Here For Detail.


.•°How to Download past papers from study groups°•.

Please Click on the below link to see…

.... 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 


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>';

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


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

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