Saturday, August 2, 2014

how to write a code for withdrawal using C#

Just simple store the input which you have after readline and convert it into double and then subtratc it from the original balance and display the remaining balance.


double OriginalBalance = 10000;


Console.WriteLine ("How much you'd like to Withdraw");


double AmmountWithdraw = double.Parse(Console.ReadLine());


OriginalAmmount -= AmmountWithdraw;


Console.WriteLine("Your Remaining balance:" + OriginalAmmount.ToString());


If you'd like i have a C++ project which does the same i can share that with you.


No comments:

Post a Comment