Advertisement
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 ConsoleApplication5
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("enter: ");
- var point = double.Parse(Console.ReadLine());
- var bonus = 0.0;
- if (point <= 100)
- {
- bonus = 5;
- }
- else if (point < 1000)
- {
- bonus = point * 0.2f;
- }
- else
- {
- bonus = point * 0.1f;
- }
- if (point % 2 == 0)
- {
- bonus += 1;
- }
- if (point % 10 == 5)
- {
- bonus += 2;
- }
- var score = point + bonus;
- Console.WriteLine(bonus);
- Console.WriteLine(score);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement