Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Jp-trize
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes h float cost = 7000.0F; int extendedUnits = 1; float coInsurance = 0.2F; float coPayment = 100.0F; float individualDeductibleRemaining = 3000.0F; float individualStopLossRemaining = 5000.0F; float FinalPTResponsibility = 0.0F; float appliedCoInsurance = 0.0F; float dedApplied = 0.0F; float outOfpoacketRemaining = 0.0F; float pDiscount = 0.8F; var activePayer = true; var isCovered = false; var isAppliedToDeductible = false; //find the total cost float Totalcost = cost * extendedUnits; Console.WriteLine("Total cost={0}", Totalcost); if (activePayer && isCovered && isAppliedToDeductible) { if (individualDeductibleRemaining <= Totalcost) { float useDed1 = 0.0F; float Bal1 = 0.0F; float PTR1 = 0.0F; float PTR2 = 0.0F; dedApplied = individualDeductibleRemaining; Console.WriteLine("dedApplied={0}", dedApplied); if ((individualStopLossRemaining - dedApplied - coPayment) > 0) { outOfpoacketRemaining = Totalcost - dedApplied - coPayment; Console.WriteLine("outOfpoacketRemaining={0}", outOfpoacketRemaining); appliedCoInsurance = outOfpoacketRemaining * coInsurance; if ((dedApplied + appliedCoInsurance) > individualStopLossRemaining) { FinalPTResponsibility = individualStopLossRemaining; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } else { Console.WriteLine("appliedCoInsurance= {0}", appliedCoInsurance); FinalPTResponsibility = dedApplied + appliedCoInsurance + coPayment; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } } else { FinalPTResponsibility = individualStopLossRemaining; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } } } if (activePayer && isCovered && !isAppliedToDeductible) { if (individualDeductibleRemaining <= Totalcost) { float useDed1 = 0.0F; float Bal1 = 0.0F; float PTR1 = 0.0F; float PTR2 = 0.0F; dedApplied = individualDeductibleRemaining; Console.WriteLine("dedApplied={0}", dedApplied); if ((individualStopLossRemaining - coPayment) > 0) { outOfpoacketRemaining = Totalcost - coPayment; Console.WriteLine("outOfpoacketRemaining={0}", outOfpoacketRemaining); appliedCoInsurance = outOfpoacketRemaining * coInsurance; if ((appliedCoInsurance) > individualStopLossRemaining) { FinalPTResponsibility = individualStopLossRemaining; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } else { Console.WriteLine("appliedCoInsurance= {0}", appliedCoInsurance); FinalPTResponsibility = appliedCoInsurance + coPayment; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } } else { FinalPTResponsibility = individualStopLossRemaining; Console.WriteLine("FinalPTResponsibility1= {0}", FinalPTResponsibility); } } } // if (activePayer && !isCovered) { FinalPTResponsibility = Totalcost * pDiscount; Console.WriteLine("FinalPTResponsibility with 80% discount= {0}", FinalPTResponsibility); } } } }
run
|
edit
|
history
|
help
0
obraek
array int
Fibonachi
azsdfghju654 ffddfdf
inheritance with virtual orride
breadbank
a
Arrange Hex string in a new one as a byte array declaration
Generic 2 parameters hierarchy
Main5