1) #include <iostream>
using namespace std;
int main()
{
double a, b, c;
cin>>a;
cout<<endl;
cin>>b;
cout<<endl;
cin>>c;
cout << "Среднее: " << (a+b+c)/3 << endl;
cout << "Разность: " << 2 * (a + c) - 3 * b << endl;
}
2) #include <iostream>
using namespace std;
int main()
{
int arr[4], max = 0;
for (int i = 0; i < 4; i++)
{
cin >> arr[i];
if(max < arr[i] && arr[i] % 2 == 0)
{
max = arr[i];
}
}
if (!max)
{
cout << "Not found";
}
else
{
cout << "Max: " <<max;
}
}
1. Input devices allow you to enter information into a computer for further storage and processing, and output devices allow you to receive information from a computer.
2. Input device types: mouse, keyboard. output device types: monitor.
3. However, regardless of the forms in which they receive their inputs, all input devices must provide a computer with data thare transformed into the binary codes that the primary memory of the computer is designed to accept. This transformation is accomplished by units called I/O interfaces.
4. A reel of magnetic tape upon which the collected data are stored in binary format is an example of a human-independent output.
5. Data enter input units in forms that depend upon the particular device used. For example, data entered from a keyboard in a manner similar to typing, and this differs from the way that data are entered by bar-code scanner.
6. The major differences between devices are the media that they use and the speed with which they are able to transfer data to or from primary storage.
7. It should be noted that the high-speed devices are entirely electronic in their operation or magnetic media that can be moved at high speed.
8. The low-speed devices are those with complex mechanical motion or operate at the speed of a human operator.
Объяснение:
Поделитесь своими знаниями, ответьте на вопрос:
Какое количество информации несет в себе сообщение о том, что нужная вам программа находится на одной из восьми дискет?
N = 8
i - ?
Решение:
N = 2^i
8 = 2^i
2^3 = 2^i
i = 3
ответ: 3 бита