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 DataTypesLab
- {
- class Program
- {
- static void Main(string[] args)
- {
- int splitCount = int.Parse(Console.ReadLine());
- double prizeByPoint = double.Parse(Console.ReadLine());
- int totalPoints = 0;
- for (int i = 0; i < splitCount; i++)
- {
- int points = int.Parse(Console.ReadLine());
- if (i%2!=0)
- {
- points *= 2;
- }
- totalPoints += points;
- }
- double prize = prizeByPoint * totalPoints;
- Console.WriteLine($"The project prize was {prize:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement