Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Bonus_Score
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Enter score: ");
- int num = int.Parse(Console.ReadLine());
- double bonusPoints = 0.0;
- if (num <= 100)
- {
- bonusPoints = 5;
- }
- else if (num > 100 && num < 1000)
- {
- bonusPoints = num * 0.2;
- }
- else if (num > 1000)
- {
- bonusPoints = num * 0.1;
- }
- if (num % 2 == 0)
- {
- bonusPoints += 1;
- }
- else if (num % 10 == 5)
- {
- bonusPoints += 2;
- }
- Console.WriteLine("Bonus score: " + bonusPoints);
- Console.WriteLine("Total score: " + (num + bonusPoints));
- }
- }
- }
Add Comment
Please, Sign In to add comment