Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace zadanie1
- {
- class Program
- {
- static double Czas(int n, double sec, int m, int razy)
- {
- int i = 1;
- int czas = 0;
- while (i < n)
- {
- i = 2 * i;
- for (int j = 0; j < n; j++)
- {
- for (int k = 0; k < m; k++)
- {
- czas = czas + 1;
- }
- }
- }
- double x = czas / razy;
- double y = sec / razy;
- int czas1 = 0;
- int i1 = 1;
- while (i1 < n)
- {
- i1 = 3 * i1;
- for (int b = 0; b < m; b++)
- {
- for (int c = 0; c < m; c++)
- {
- czas1 = czas1 + 1;
- }
- }
- }
- double z = czas1 * razy;
- double wynik = z * y / x;
- return wynik;
- }
- static void Main(string[] args)
- {
- Console.WriteLine(Czas(8, 30, 16, 2));
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement