- Регистрация
- 25.11.2012
- Сообщения
- 544
- Благодарностей
- 26
- Баллы
- 28
Would like to know how to get ZP to calculate percentages. i.e. I need to take a price, then add, say, 13.5% to the total.
Is this possible?
Is this possible?
double price= 200;
double percent =13.5;
double total = price+price*percent/100;
return total;
Thanks man, that works a treat!Код:double price= 200; double percent =13.5; double total = price+price*percent/100; return total;
There is nothing that can cause bugs... Please give the details. What errors you get.Vlad; that solution that you gave me is causing major bugs in my template. When I delete the c#, everything works as normal.
I'm gonna stick this into bugs section.
Sorry, I don't mean to add the currency; just add 5 to the percent total.
double price= 200;
double percent =13.5;
double total = price+price*percent/100+5;
return total;
int price = int.Parse(project.Variables["price"].Value);
return price*13.5/100+price;
double price= 200;
double percent =13.5;
double total = price+price*percent/100+5; // calculating price+percent+profit margin
double extratotal = total+0.1*total+0.034*total+0.2; // calculating total price+ebay fee+paypal fee
return extratotal;
double price= double.Parse(project.Variables["amazon_price"].Value); //Amazon item price
double profit = 5.0; // My profit margin
double ebay = 10.00; // ebay's final selling fees (%)
double paypal = 3.4+0.20; // Paypal fee of 3.4% and 0.20
double total = price+price*ebay*paypal/100+profit; // calculating price+percent+profit margin
return total;
double price= double.Parse(project.Variables["amazon_price"].Value); //Amazon item price
double profit = 5.0; // My profit margin
double fees = 13.4; // ebay's 10%, and Paypal's 3.4% (the 20p part of Paypal is in total)
double total = price+price*fees/100+profit+0.2; // calculating price+percent+profit margin, and 20p part for the Paypal fee
return total;