• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Sunday, September 9, 2012

LIBRARY PROGRAM WITH FOR IN C++


Hi.. Welcome to my blog… In here you will getting many IT knowledge.. From Dekstop programming until web programming here. You can take it for free, because science is to be shared rather than owned their own.

Previously I was making library program, and now I making library program again, but I using syntax “FOR”. many ways that we can use to create a program library, such as the use of this syntax, is not so complicated in making this program on, it's just that you must understand the general form of the syntax.

If you forget syntax FOR in c++ you can look this. :

For (a = 1; a <= 4; a ++)

Ok direct to program.. you can copy this coding to your compiler.

Example 1 :

#include <conio.h>
#include <iostream.h>

main()
{
clrscr;
char d[20];
int a, b, c, x;
cout << "            Welcome To My Program" << endl;
cout << "       This Is Sample Library Program" << endl;
cout << "         Made By - We Are Knowledge" << endl << endl << endl;
cout << "Input Your Name                :  ";
cin  >> d;
cout << "Input Count Of Book            :  ";
cin  >> a;
cout << "Input Put Your Old Will Borrow :  ";
cin  >> x;
clrscr;
c = 0;
for (b = 1; b <= x; b++)
{
c = c + 2500;
}
cout <<endl << endl;
cout << "Borrower Name Book             :  " << d << endl;
cout << "The Number Of Books Borrowed   :  " << a << " Books" << endl;
cout << "Borrow Your Old Books          :  " << x << " Days"  <<endl;
cout << endl;
cout << "=========================================" << endl;
cout << "So, You Have to Pay Total      :  Rp. " << c * a;
getch();
}


Attentions ::

Change all quotes (“ “) and (‘ ‘) if you copy and paste, in order to occur error.
Press alt  + F9 in your keyboard for compile the program
Press ctrl + F9 in your keyboard for running the program.


Ok.. just it…
I hope you like and understand…
See you laters friends…

No comments:

Post a Comment