JasperHuyghe

Lagenmodel oef5

Mar 9th, 2023
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.44 KB | None | 0 0
  1. program.cs
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace OefLagenmodel09_03
  9. {
  10.     class Korting
  11.     {
  12.  
  13.         public double Verrekenkorting(double VP)
  14.         {
  15.             double korting;
  16.            
  17.             if (VP <= 49.99)
  18.             {
  19.                 korting = 0.025;
  20.             }
  21.             else if (VP <= 99.99)
  22.             {
  23.                 korting = 0.05;
  24.             }
  25.             else if (VP <= 199.99)
  26.             {
  27.                 korting = 0.1;
  28.             }
  29.             else
  30.             {
  31.                 korting = 0.2;
  32.             }
  33.  
  34.             return VP - (VP * korting);
  35.  
  36.         }
  37.     }
  38. }
  39.  
  40.  
  41. Korting.cs
  42. using System;
  43. using System.Collections.Generic;
  44. using System.Linq;
  45. using System.Text;
  46. using System.Threading.Tasks;
  47.  
  48. namespace OefLagenmodel09_03
  49. {
  50.     class Korting
  51.     {
  52.  
  53.         public double Verrekenkorting(double VP)
  54.         {
  55.             double korting;
  56.            
  57.             if (VP <= 49.99)
  58.             {
  59.                 korting = 0.025;
  60.             }
  61.             else if (VP <= 99.99)
  62.             {
  63.                 korting = 0.05;
  64.             }
  65.             else if (VP <= 199.99)
  66.             {
  67.                 korting = 0.1;
  68.             }
  69.             else
  70.             {
  71.                 korting = 0.2;
  72.             }
  73.  
  74.             return VP - (VP * korting);
  75.  
  76.         }
  77.     }
  78. }
  79.  
Advertisement
Add Comment
Please, Sign In to add comment