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 Парична_награда
- {
- class Program
- {
- static void Main(string[] args)
- {
- int partsProjects = int.Parse(Console.ReadLine());
- double priceForPoint = double.Parse(Console.ReadLine());
- var sum = 0;
- var TotalPrice = 0.0;
- for (int i = 1; i <= partsProjects; i++)
- {
- var points = int.Parse(Console.ReadLine());
- if (i % 2 == 0)
- {
- // SUKRATENO
- points *= 2;
- }
- sum += points;
- }
- TotalPrice = (sum * priceForPoint);
- Console.WriteLine($"The project prize was {TotalPrice:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement