Can you tell me any c++ programs or sites .
Programs like:
1.to make a library booking system.
2.ATM system
3.bank account
can I get the coding for such programs?
Any programs which will show the features of C++
A C++ program?
i'm not about to make you a program right here but you can go here for some tips tricks and learning tutorials
http://www.cplusplus.com/doc/tutorial/co...
Reply:#include%26lt;stdio.h%26gt;
#include%26lt;conio.h%26gt;
#include%26lt;stdlib.h%26gt;
#include%26lt;iostream.h%26gt;
void main()
{
int choice, a;
float money,m;
clrscr();
void deposite();
void withdraw();
//int func1();
cout%26lt;%26lt;"Student ID : TATA_12345"%26lt;%26lt;endl;
cout%26lt;%26lt;"NAME : RATAN TATA"%26lt;%26lt;endl;
cout%26lt;%26lt;"(1) DEPOSITE MONEY"%26lt;%26lt;endl;
cout%26lt;%26lt;"(2) WITHDRAW MONEY"%26lt;%26lt;endl;
cout%26lt;%26lt;"(3) FIND THE ACCOUNT BALANCE"%26lt;%26lt;endl;
cout%26lt;%26lt;"Enter your choice : ";
cin%26gt;%26gt;choice; /*read the choice*/
switch (choice)
{
case 1:
deposite(); /*to deposite money*/
break;
case 2:
withdraw(); /*to withdraw money*/
break;
case 3: /*to see the balance*/
cout%26lt;%26lt;endl%26lt;%26lt;"This facility is not currently available"%26lt;%26lt;endl;
break;
default: /*if choice is not valid*/
cout%26lt;%26lt;"ERROR// PLEASE TRY AGAIN";
exit(1);
}
getch();
}
void deposite()
{
float money;
cout%26lt;%26lt;endl%26lt;%26lt;"Enter the amount of money to be deposited(dollars.cents):";
cin%26gt;%26gt;money; /*read the amount to be deposited*/
if(money%26gt;0)
{
cout%26lt;%26lt;endl%26lt;%26lt;"$"%26lt;%26lt;money%26lt;%26lt;" has been deposited in your account"%26lt;%26lt;endl;
}
else
cout%26lt;%26lt;endl%26lt;%26lt;"Please enter valid amount......."%26lt;%26lt;endl;
}
void withdraw()
{
long int rem,f,t,e;
long int mon;
cout%26lt;%26lt;"Enter the amount of money to be withdrawn: ";
cin%26gt;%26gt;mon; /*read the amount to be withdrawn*/
if(mon%26gt;=20)
{
if(mon!=30)
{
f=mon/50; /*decides the notes of $50*/
rem=mon%50;
if(rem!=20)
{
if (rem==10||rem==30)
{
f-=1;
rem+=50;
}
}
t=rem/20; /*decides the notes of $20*/
e=rem%20;
if(e==0)
{
cout%26lt;%26lt;endl%26lt;%26lt;"Nos. of 50$ note : "%26lt;%26lt;f;
cout%26lt;%26lt;endl;
cout%26lt;%26lt;"Nos. of 20$ note : "%26lt;%26lt;t%26lt;%26lt;endl;
cout%26lt;%26lt;"TOTAL AMOUNT : "%26lt;%26lt;mon%26lt;%26lt;endl;
}
else
cout%26lt;%26lt;endl%26lt;%26lt;"This amount is not possible... Please try again"%26lt;%26lt;endl;
}
else /*if amount is not possible*/
{
cout%26lt;%26lt;endl;
cout%26lt;%26lt;"This amount is not possible... Please try again"%26lt;%26lt;endl;
}
}
else
{
cout%26lt;%26lt;endl;
cout%26lt;%26lt;"This amount is not possible... Please try again"%26lt;%26lt;endl;
}
}
Reply:See this website,
http://www.deitel.com/books/cpphtp5/cpph...
orange
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment