1. Десятичные - Двоичные
127 = 1111111
195 = 11000011
289 = 100100001
513 = 1000000001
54 = 110110
2. Двоичные - Десятичные
110101 = 53
100111 = 39
1101100 = 108
1011101 = 93
11001101 = 205
361,105 (10)=3*10^2+6*10^1+1*10^0+1*10^(-1)+0*10^(-2)+5*10^(-3)
224 (16)=2*16^2+2*16^1+4*16^0
521 (8)=5*8^2+2*8^1+1*8^0
111011 (2)=1*2^5+1*2^4+1*2^3+0*2^2+1*2^1+1*2^0
#include <iostream>
#include <stack>
using namespace std;
void digits(int *num);
int main()
{
int num;
cin >> num;
void(*ptr)(int *num);
ptr = digits;
(*ptr)(&num);
return 0;
}
void digits(int *num)
{
stack<short int> stack;
while(*num>0)
{
stack.push(*num % 10);
*num /= 10;
}
while(!stack.empty())
{
cout << stack.top() << " ";
stack.pop();
}
}
28800бит/с=28800/8байт/с=3600байт/с
t=640*480*3/(3600)=256с
A)
#include <iostream>
<span>
#include "math.h"</span>
using namespace std;
int main()
{
const double Pi = 3.14;
double x,y;
<span> cin >> x;
</span>
y=((2*pow(sin(x),2))/(Pi*x)-atan(x));
cout << y << endl;
<span>}
б)
</span>#include <iostream>
<span>
<span>#include <cmath>
</span></span>double log(double a, double b)
{
return log(b) / log(a);
}
using namespace std;
int main()
{
double x,y;
cin >> x;
y=log(5,abs(x-12.5*pow(x,9))+((2*x-4)/(abs(pow(x,8)-12*pow(x,4)+5.1*pow(x,3)))));
cout << y << endl;
}