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
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