По разделам

 

Решение задачи Integer 20


С начала суток прошло N секунд (N — целое). Найти количество
полных часов, прошедших с начала суток.

Код (C/C++)

#include <stdio.h>

int main(void)
{
    int N;
    printf("N:");
    scanf ("%i", &N);

    printf("%i\n",N/60/60);

    return 0;
}

Код (Python)

import random

N = random.randrange(0,86400)
print("Число секунд: ", N)
h = int(N/60/60)
print("Целые часы: ", h)
									

Код (Pascal)

program Integer20;
var
  Ts, Tm: Integer;
begin
  Write('Введите кол-во секунд: ');
  Readln(Ts);
  Tm:=Ts div (60*60);
  Writeln('Кол-во полных часов: ',Tm);
end.
									




Integer. Абрамян
Integer 1 Просмотров: 12398
Integer 2 Просмотров: 7826
Integer 3 Просмотров: 8285
Integer 4 Просмотров: 36280
Integer 5 Просмотров: 8645
Integer 6 Просмотров: 7231
Integer 7 Просмотров: 7145
Integer 8 Просмотров: 5699
Integer 9 Просмотров: 4775
Integer 10 Просмотров: 6411
Integer 11 Просмотров: 6781
Integer 12 Просмотров: 7194
Integer 13 Просмотров: 6664
Integer 14 Просмотров: 3661
Integer 15 Просмотров: 4601
Integer 16 Просмотров: 3790
Integer 17 Просмотров: 4086
Integer 18 Просмотров: 3744
Integer 19 Просмотров: 5595
Integer 20 Просмотров: 4354
Integer 21 Просмотров: 4678
Integer 22 Просмотров: 3811
Integer 23 Просмотров: 4722
Integer 24 Просмотров: 8632
Integer 25 Просмотров: 3813
Integer 26 Просмотров: 3369
Integer 27 Просмотров: 3193
Integer 28 Просмотров: 4001
Integer 29 Просмотров: 5284
Integer 30 Просмотров: 4852

Комментарии

Чтобы написать комментарии вам нужно войти в систему или зарегистрироваться



Заявка на расчет