По разделам

 

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


Дан размер файла в байтах. Используя операцию деления нацело,
найти количество полных килобайтов, которые занимает данный файл
(1 килобайт = 1024 байта).

Код (C/C++)

#include <iostream>
using namespace std;
int main(){
	int b, kb;
	cout << "Vvedite B: ";
	cin >> b;
	kb = int(b/1024);
	cout << "Kolichestvo polnyikh kilobaytov: " << kb;
	return 0;
}

Код (Python)

import random

s = random.randrange(1,1000000)
print("Размер файла в байтах: ", s)
print("Количество полных килобайтов: ", int(s / 1024))

									

Код (Pascal)

program Integer3;
var
  byte, kilobyte: Integer;
begin
  Write('Введите размер файла в байтах: ');
  Readln(byte);
  kilobyte:=byte div 1024;
  Writeln('Данный файл занимает ',kilobyte,' полных килобайт.');
end.
									




Integer. Абрамян
Integer 1 Просмотров: 11858
Integer 2 Просмотров: 7527
Integer 3 Просмотров: 7958
Integer 4 Просмотров: 36003
Integer 5 Просмотров: 8405
Integer 6 Просмотров: 6939
Integer 7 Просмотров: 6783
Integer 8 Просмотров: 5430
Integer 9 Просмотров: 4548
Integer 10 Просмотров: 6165
Integer 11 Просмотров: 6509
Integer 12 Просмотров: 6928
Integer 13 Просмотров: 6467
Integer 14 Просмотров: 3464
Integer 15 Просмотров: 4393
Integer 16 Просмотров: 3588
Integer 17 Просмотров: 3879
Integer 18 Просмотров: 3538
Integer 19 Просмотров: 5381
Integer 20 Просмотров: 4122
Integer 21 Просмотров: 4467
Integer 22 Просмотров: 3630
Integer 23 Просмотров: 4512
Integer 24 Просмотров: 8381
Integer 25 Просмотров: 3642
Integer 26 Просмотров: 3219
Integer 27 Просмотров: 2983
Integer 28 Просмотров: 3732
Integer 29 Просмотров: 5072
Integer 30 Просмотров: 4630

Комментарии

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



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