PDA

View Full Version : Need help with proggie!


Nexgen
06-11-2002, 06:49 AM
Hi There

I wrote a program in c++ for my dad . He goes to cattle auctios and then needs to calculate some things!

I don't know how to rewrite the program to work on a palm !
If there is anyone here that is willing to help i would really appreciate it ! I live in South Africa and here we don't even have any institutes that help us on Palm OS development!

Here is the code in c++

==============================================
//Auctions

#include<iostream.h>
#include<iomanip.h>
#include<stdlib.h>

int main()
{
double weight = 0.0; double i = (0.44);
double j = (11.5); double sloughterweight = 0.0;
double Price; double skin;
double skinweight = 0; double skinprice = 0;
double sell = 0; double meatselled = 0;
double rest = 0; double profit = 0;

system("cls");
cout<<"What is the cattle's Weight\t:";
cin>>weight;
cout<<"What is the skin price of te week \t:";
cin>>skin;
cout<<"What is the meats Selling price( Average of $ 13.20 )\t:";
cin>>meatselled;
cout<<"What is the remains price of the week( Average of $240 ) \t:";
cin>>rest;

for(j=11.5;j<12.8;j+=0.10)
{
system("cls");
for(i=0.44;i<0.54;i+=0.01)
{
sloughterweight = (weight * i);
skinweight = ( sloughterweight * 0.13);
skinprice = ( skinweight * skin);
sell =(sloughterweight * meatselled);
Prys = (sloughterweight * j);
wins = (sell - price + rest + skinprice);
cout.setf(ios::fixed);
cout<<setprecision(2)<<"Uitslag ratio "<<i<<setprecision(2)<<" Slag uit :"
<<sloughterweight<<setprecision(2)<<" Kg "<<" @ "<<j
<<" Veiling Prys =" <<" R "<<Price<<setprecision(2)
<<" Totale wins R"<<profit<<endl;
}//2nd for
system("pause");
}//1st for

return 0;
}//end of file


Thanks Nexgen

GPeszek
06-11-2002, 05:01 PM
Too bad you weren't here last year when we offered the advanced Palm Programing class http://campcaen.engin.umich.edu/iB_html/non-cgi/emoticons/smile.gif

BHelmkamp
06-16-2002, 01:43 PM
It should be noted that most of the materials we worked with in the Palm Dev class last summer are still available here:

http://campcaen.engin.umich.edu/insession/palmdev/

Hope this helps.

-Bryan