daily pastebin goal
17%
SHARE
TWEET

Untitled

a guest Mar 26th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Bonus_Score_1._01
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int number = int.Parse(Console.ReadLine());
  10.             double bonus = 0.0;
  11.  
  12.             if (number <= 100)
  13.             {
  14.                 bonus = 5;
  15.             }
  16.            
  17.             else if (number > 1000)
  18.             {
  19.                 bonus = number * 0.10;
  20.             }
  21.             else if (number > 100)
  22.             {
  23.                 bonus = number * 0.20;
  24.             }
  25.  
  26.            
  27.  
  28.             if (number % 2 == 0)
  29.             {
  30.                 bonus += 1;
  31.             }
  32.             else if (number % 5 == 10)
  33.             {
  34.                 bonus += 2;
  35.             }
  36.  
  37.             Console.WriteLine(bonus);
  38.             Console.WriteLine(number + bonus);
  39.  
  40.         }
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top