Program calk; uses crt; var a,b,c,d,x1,x2 : real; begin textcolor(red); gotoxy(10,5); write('вас калькулятор решать квадратные уравнения'); gotoxy(10,6); write('введите а='); readln(a); gotoxy(10,7); write('введите b='); readln(b); gotoxy(10,8); write('введите с='); readln(c); d: =b*b-4*a*c; readln(d) if d< 0 then begin gotoxy(10,9); textcolor(red); write('нет действительных корней') end else begin if d=0 then begin gotoxy(10,10); textcolor(red); x1: =(-b/2*a); write('уравнение имеет один корень и он равен: x1 =',x1: 2: 2,''); end else begin if d> 0 then begin x1: =(-b-sqrt(d))/(2*a); x2: =(-b+sqrt(d))/(2*a); write('уравнение имеет 2 корня и они равны: x1 =',x1: 2: 2,' ','x2=',x2: 2: 2) end; end. в чем
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.
Объяснение: