addy771
2007-05-16 01:45:10
Program I made in Pascal, you can download it at http://uppit.com/d/ZCCOT
It has 4 helpful modes that will help you buy and sell so fast you will beat all your competitors.
I know you won't be trusting an .exe, and I don't blame you, so here is the source for the admins to see and confirm the program is safe.
If you have any suggestions for new features please let me know.
It has 4 helpful modes that will help you buy and sell so fast you will beat all your competitors.
I know you won't be trusting an .exe, and I don't blame you, so here is the source for the admins to see and confirm the program is safe.
Program MerchantsPal;
uses crt;
var mode,gothru,done:string;
exitn:boolean;
cash:integer;
Procedure modea;
var units,price,total:integer;
begin
gothru:='n';
writeln;
writeln;
writeln('-MODE A-');
writeln('What is the unit price of the item you are selling?(How much per item?)');
readln(price);
writeln('And how many of these items are you selling?');
readln(units);
total:=price*units;
writeln('So, you are selling ',units,' Item[s] at a unit price of ',price,'G each. This means you');
writeln(' will gain ',total,'G from selling these.');
delay(1000);
writeln('Do you wish to accept this? (Y/N) If you say no, your cash will not be edited');
writeln(' and you will be taken to the menu.');
readln(gothru);
if(gothru='Y') or (gothru='y')then
begin
cash:=cash+total;
writeln('Transaction complete. You now have ',cash,'G in total.');
delay(1000);
writeln;
writeln;
end;
end;
Procedure modeb;
var units,price,total:integer;
begin
gothru:='n';
writeln;
writeln;
writeln('-MODE B-');
writeln('What is the unit price of the item you are buying?(How much per item?)');
readln(price);
writeln('And how many of these items are you buying?');
readln(units);
total:=price*units;
writeln('So, you are buying ',units,' Item[s] at a unit price of ',price,'G each. This means you ');
writeln(' will spend ',total,'G for all of them.');
delay(1000);
writeln('Do you wish to accept this? (Y/N) If you say no, your cash will not be edited ');
writeln('and you will be taken to the menu.');
readln(gothru);
if(gothru='Y') or (gothru='y')then
begin
cash:=cash-total;
writeln('Transaction complete. You now have ',cash,'G in total.');
delay(1000);
writeln;
writeln;
end;
end;
Procedure modec;
var units,price,total:integer;
begin
gothru:='n';
total:=0;
writeln;
writeln;
writeln('-MODE C-');
writeln;
repeat
writeln;
writeln('How many of this item do you have?');
readln(units);
writeln('What is the unit price of the item? ?(How much per item?)');
readln(price);
total:=total+(price*units);
done:='n';
writeln('Would you like to add any more items?(Y/N)');
readln(done);
until(done='n') or (done='N');
writeln('The total price of the items you just took stock of is ',total,'G.');
delay(1000);
writeln('If you sold all those items, your total would be ',cash+total,' gold.');
writeln;
writeln('press enter to return to menu.');
readln;
end;
Procedure moded;
begin
writeln;
writeln('Enter the new amount:');
readln(cash);
writeln;
writeln('Your new cash amount is ',cash,' Gold.');
writeln;
writeln('You will now be taken back to the menu.');
delay(1000);
end;
BEGIN
TextBackground(7);
clrscr;
textcolor(red);
writeln('Welcome to Merchants Pal 1.0!');
writeln('Copyright 2007 Addy Studios (Adam Oakley)');
writeln;
textcolor(1);
writeln('Using this program you can manage your items for ANY online game!');
writeln('Begin by telling me how much money you have right now:');
readln(cash);
writeln('Okay, you have ',cash,' Gold Pieces.');
delay(1000);
writeln;
writeln;
repeat
writeln('Please select a mode:');
writeln('A. SELL item[s]');
writeln('B. BUY item[s]');
writeln('C. Take/Update inventory of all items.');
writeln('D. Modify Cash');
writeln('E. Exit this program');
readln(mode);
if(mode='a') or (mode='A')then
modea;
if(mode='b') or (mode='B')then
modeb;
if(mode='c') or (mode='C')then
modec;
if(mode='d') or (mode='D')then
moded;
if(mode='e') or (mode='E')then
exitn:=true;
until(exitn=true);
writeln;
writeln;
writeln('Exiting program, you finish with ',cash,'G in total.');
delay(1000);
writeln('Thanks for using Merchant Pal by Addyrulez! Visit us on the web at addy.awardspace.com');
delay(1000);
writeln('Press Enter to quit');
readln;
end.
If you have any suggestions for new features please let me know.