????? ?????????????, ???????????? ????? CyberForum.ru
???? ????????

?????? ??????????? ?????, ??????????? ?? ?????? ????? ? ??????? ?? ????? - C++

?????
???????????
???????????? ??????
?????? ???? ???????
C++ ??????? ????????? ??????? ???????? ????? ??????? 5 ?? ????? m http://www.cyberforum.ru/cpp-beginners/thread1221719.html
????????? ????-????? ????????? ? ????????? ???????? ??????? ???? ????? ?? 1 ?? 1000 ? ????? m.??????? ????????? ??????? ???????? ????? ??????? 5 ?? ????? m.
C++ ??????????? ???????????? scanf() ? ???? ???? // ?? ???????? scanf() ? ????? if, ???? ?? ????? %c ????????? ?????? ?????? ??, ???? ?????? Y ?? ?????????? // ????????? ?????, ???????? ??? ????? z.a, 99 ??? ??????? #include <cstdio> #include... http://www.cyberforum.ru/cpp-beginners/thread1221682.html
C++ ?????? ?????????? ??????????? ???????. ????????? ?????????? ???? (C++ 11)
??????? ??????? ?????. ??????????, ??? ????????? ????????? ??????????? ???????, ?? ?????????, ???? ??? ??????????? ? ?????? ?????? ???? ??????? bool sort(int** matrix, int row), ??????? ??????????...
C++ ????? ?????????? ????????? ???????, ??????????????? ??????? 1<b[i]<m
? ??????? b(25), ?????????????? ????????? ???????, ????? ?????????? ?????????, ??????????????? ??????? 1<b<m, ??? 1 ? m - ???????? ?????.
C++ ???????? ???????? ???????? ????????? ?? ??????????? ???????? ??????? http://www.cyberforum.ru/cpp-beginners/thread1221616.html
? ??????? ?, ?????????????? ????????? ???????, ???????? ???????? ???????? ????????? ?? ??????????? ???????? ???????.
C++ ?????? ?? ???????? gotoxy () ????????? ????????? ??????? ??????????? ? "gotoxy ()", ????? ????? ??? ??????: #include <conio.h> int main(void) { clrscr(); gotoxy(35,12); cprintf("??????!"); getch(); ?????????

???????? ????????? ????????
nik13666
?????????: n/a

?????? ??????????? ?????, ??????????? ?? ?????? ????? ? ??????? ?? ????? - C++

03.07.2014, 10:25. ?????????? 651. ??????? 1
????? (??? ?????)

???? ??????. ???? ?? ?????? ? ???????? ? ????? ??????. ? ????? ???? ???? ???????? ???? ?? ???? ? 5 ??????????? ????? ??????????? ?? ?????? ????? ? ??????? ?? ?????
C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <iostream>
using namespace std;
struct Complex//?????????
{
    float re,im;
};
Complex CMPX(float r,float i)//???????? ??????????? ?????
{
    Complex res;
    res.im=i;
    res.re=r;
    return res;//?????????
}
void Print(Complex a)//???????
{
    cout<<"Re = "<<a.re<<"   Im = "<<a.im<<endl;
}
float Cabs(Complex a)
{
    return sqrt(a.re*a.re+a.im*a.im);//?????? ????? ????????????
}
float Carg(Complex a)
{
    return atan(a.im/a.re);//????????
}
Complex Cmult(Complex a,Complex b)
{
    Complex res;
    float mabs=Cabs(a)*Cabs(b);//????????? ???????
    res.re=mabs*cos(Carg(a)+Carg(b));//re
    res.im=mabs*sin(Carg(a)+Carg(b));//im
    return res;//??????????
}
Complex Cdiv(Complex a,Complex b)
{
    Complex res;
    float mabs=Cabs(a)/Cabs(b);//??????? ???????
    res.re=mabs*cos(Carg(a)-Carg(b));//re
    res.im=mabs*sin(Carg(a)-Carg(b));//im
    return res;
}
int main()
{
    Complex a,b,c,z;//??? ??????????? ?????
    float re,im;
    cout<<"A re = ";cin>>re;//??????? re
    cout<<"A im = ";cin>>im;// im 
    a=CMPX(re,im);// ??????? ??????????? ?????
    cout<<"Abs = "<<Cabs(a)<<endl<<"Arg = "<<Carg(a)<<endl;//?????? ? ???????? ???????
    Print(a);//??????? a
    cout<<endl;//??????? ??????
    cout<<"B re = ";cin>>re;
    cout<<"B im = ";cin>>im;
    b=CMPX(re,im);
    cout<<"Abs = "<<Cabs(b)<<endl<<"Arg = "<<Carg(b)<<endl;//???????
    Print(b);//??????? b
    cout<<endl;
    cout<<"C re = ";cin>>re;
    cout<<"C im = ";cin>>im;
    c=CMPX(re,im);
    cout<<"Abs = "<<Cabs(c)<<endl<<"Arg = "<<Carg(c)<<endl;//???????
    Print(c);//??????? c
    cout<<endl;
    z=Cdiv(Cmult(a,b),c);//?? ??? ????? ? ???????, ??????????? ??????
    cout<<"a*b/c"<<endl;
    Print(z);
    system("pause");
    return 0;
}
????????? ????? 2 ??????
?????? ??????? ??? ????? ??? ???? ?????? 5 ??????????? ?????. ?????????? ?????? ?? ??????????? ? ??????? ?? ?????. ????? ?????????
??????? ???????? ????????????????? ? ??? ???????? ?????????.
 
?????????? - ????? ?????????????, ???????????? ?????, ????????????????
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
???????@Mail.ru