Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- double students = double.Parse(Console.ReadLine());
- int seasons = int.Parse(Console.ReadLine());
- double continuing = 0.0;
- for (int i = 1; i <= seasons; i++)
- {
- double firstExam = Math.Ceiling(students * 0.90);
- double secondExam = Math.Ceiling(firstExam * 0.90);
- continuing = Math.Ceiling(secondExam * 0.80);
- if (i % 3 == 0)
- {
- continuing += Math.Ceiling(continuing * 0.15);
- }
- else
- {
- continuing += Math.Ceiling(continuing * 0.05);
- }
- students = continuing;
- }
- Console.WriteLine($"Students: {students}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement