Integer3. Given the size of the file in bytes. Using the integer division operation, find the number of total kilobytes that this file occupies (1 kilobyte = 1024 bytes).

Solution in Python 3:

import random

s = random.randrange(1,1000000)
print("The size of the file in bytes: ", s)
print("Number of kilobytes: ", int(s / 1024))

Solution in C++:

#include<iostream>
using namespace std;
int main(){
int b, kb;
cout << "Enter the size of the file in bytes: ";
cin >> b;
kb = int(b/1024);
cout << "Number of kilobytes: " << kb;
return 0;
}