Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _04._Exam_Retention
- {
- class Program
- {
- static void Main(string[] args)
- {
- double students = double.Parse(Console.ReadLine());
- int seasons = int.Parse(Console.ReadLine());
- double newStudents = 0;
- for (int i = 1; i <= seasons; i++)
- {
- for (int j = 1; j <= 2; j++)
- {
- students = Math.Ceiling(students * 90 / 100);
- }
- students = Math.Ceiling(students * 80 / 100);
- if (i % 3 == 0)
- {
- newStudents = Math.Ceiling(students * 15 / 100);
- }
- else
- {
- newStudents = Math.Ceiling(students * 5 / 100);
- }
- students += newStudents;
- }
- Console.WriteLine($"Students: {students}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment