Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int engeneerCount = 5;
- static int totalTime = 0;
- static int dialogCounts = 0;
- static int totalCalculateTime = 0;
- public static void dialog() {
- int dialog_time = 0;
- int calculate_time = 0;
- for (int j = 0; j < 10; j++) {
- // инженер думает // работает процессор // вывод на экран
- dialog_time += random(5, 10) + 2 + 5;
- }
- // расчет конструкции
- calculate_time = random(20, 30);
- dialog_time += calculate_time;
- totalCalculateTime += calculate_time;
- // вывод на экран
- dialog_time += 5;
- // анализ данных инженером
- dialog_time += random(10, 20);
- totalTime += dialog_time;
- dialogCounts++;
- }
- public static void maqin(String[] args) {
- do {
- for (int i = 0; i < engeneerCount; i++) {
- dialog();
- }
- } while (dialogCounts < 100);
- System.out.println("Общее время выполнения:" + totalTime / 5);
- }
Add Comment
Please, Sign In to add comment