123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ClassLibrary_CountingSale
- {
- public class SaleCount
- {
- public static double saleCount(int kol_vo, double prse)
- {
- double sale = 0;
- if (kol_vo >= 3)
- {
- sale = 5;
- }
- else if (kol_vo >= 5)
- {
- sale = 10;
- }
- else if (kol_vo >= 10)
- {
- sale = 15;
- }
- sale += Math.Floor(prse / 500);
- if (sale > 99)
- {
- sale = 99;
- }
- return sale;
- }
- }
- }
|