,   CyberForum.ru

- C++

C++ http://www.cyberforum.ru/cpp-beginners/thread280047.html
! , . ? : #include "afxwin.h" #include "setupapi.h" #include "iostream" using namespace std; #pragma comment(lib,"setupapi.lib") void main()
C++ 0,001 , "cmath", , , , : , , 0,001. 1 : #include "stdafx.h" #include "iostream" #define PI... http://www.cyberforum.ru/cpp-beginners/thread279998.html
. i-oro j- . . . C++
17. . i-oro j- . . . ( !
C++
, . ( ) , - , . . , . ( ) , , , , ...
C++ http://www.cyberforum.ru/cpp-beginners/thread279969.html
. . : , . : ...
C++ operator + , + , .... , ? Matrix Matrix::operator+(const Matrix second) { if(m!=second.m || n!=second.n) { cerr<<"Raznyj razmer"<<endl; return Matrix(); } else {

tc
   tc
1 / 1 / 0
: 06.02.2011
: 76
20.04.2011, 18:22  []    
Setsuna
... ... , .

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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
//Ä**û õ*ð*êòåðèñòèêè îáìå**ûõ ïó*êòîâ: **çâ**èå, êóðñ ïîêóïêè â*ëþòû, êóðñ ïðîä*æè â*ëþòû , *äðåñ è òåëåôî*.
// *) Âûÿñ*èòü **çâ**èå è *äðåñ îáìå**îãî ïó*êò* ñ ì*êñèì*ëü*ûì êóðñîì ïîêóïêè â*ëþòû.
// á) Âûÿñ*èòü **çâ**èå *äðåñ òåëåôî* îáìå**îãî ïó*êò* ñ ìè*èì*ëü*ûì êóðñîì ïðîä*æè â*ëþòû.
// â) Âûâåñòè *äðåñ* è **çâ**èÿ îáìå**ûõ ïó*êòîâ ñ îäè**êîâûìè êóðñ*ìè ïîêóïêè
// ã) Âûâåñòè **çâ**èå, *äðåñ* è òåëåôî*û îáìå**ûõ ïó*êòîâ ñ ñîâï*ä*þùèìè êóðñ*ìè ïðîä*æè â*ëþòû.
#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<cstring>
 
using namespace std;
 
main()
{
 struct punkt //ñîçä**èå ñòðóêòóðû îáìå**ûõ ïó*êòîâ
 {
  string name; //èìÿ ïó*êò*
  float kurspok;  //êóðñ ïîêóïêè
  float kursprod; //êóðñ ïðîä*æè
  string adress; //*äðåññ
  int tel; //òåëåôî*
 };
 punkt c1; //ñîçä**èå ïåðâîãî îáìå**îãî ïó*êò*
 c1.name="qwerty"; //è ç*ïîë*å*èå åãî õ*ð.
 c1.kurspok=230;
 c1.kursprod=340;
 c1.adress="ul. 1, d.2";
 c1.tel=343537;
 punkt c2; //ñîçä**èå 2îãî îáìå**îãî ïó*êò*
 c2.name="qwerty2";  //è ç*ïîë*å*èå åãî õ*ð.
 c2.kurspok=260;
 c2.kursprod=330;
 c2.adress="ul. 3, d.5";
 c2.tel=947538;
//----------------------------------------âîïðîñ À
// *) Âûÿñ*èòü **çâ**èå è *äðåñ îáìå**îãî ïó*êò* ñ ì*êñèì*ëü*ûì êóðñîì ïîêóïêè â*ëþòû.
 cout<<endl;
 if (c1.kurspok>c2.kurspok)
 {
  cout<<"name= "<<c1.name<<endl;
  cout<<"adress= "<<c1.adress<<endl;
 }
 else
 {
  cout<<"name= "<<c2.name<<endl;
  cout<<"adress= "<<c2.adress<<endl;
 } 
//----------------------------------------âîïðîñ Á
// á) Âûÿñ*èòü **çâ**èå *äðåñ òåëåôî* îáìå**îãî ïó*êò* ñ ìè*èì*ëü*ûì êóðñîì ïðîä*æè â*ëþòû.
 cout<<endl;
 if (c1.kursprod<c2.kursprod)
 {
  cout<<"name= "<<c1.name<<endl;
  cout<<"adress= "<<c1.adress<<endl;
  cout<<"tel= "<<c1.tel<<endl;
 }
 else
 {
  cout<<"name= "<<c2.name<<endl;
  cout<<"adress= "<<c2.adress<<endl;
  cout<<"tel= "<<c2.tel<<endl;
 }  
//----------------------------------------âîïðîñ B
// â) Âûâåñòè *äðåñ* è **çâ**èÿ îáìå**ûõ ïó*êòîâ ñ îäè**êîâûìè êóðñ*ìè ïîêóïêè.
 cout<<endl;
  if (c1.kurspok==c2.kurspok)
 {
  cout<<"name= "<<c1.name<<endl;
  cout<<"adress= "<<c1.adress<<endl;
 }
 else
 {
  cout<<"name= "<<c2.name<<endl;
  cout<<"adress= "<<c2.adress<<endl;
 }
//----------------------------------------âîïðîñ Ã
// ã) Âûâåñòè **çâ**èå, *äðåñ* è òåëåôî*û îáìå**ûõ ïó*êòîâ ñ ñîâï*ä*þùèìè êóðñ*ìè ïðîä*æè â*ëþòû.
 cout<<endl;
   if (c1.kursprod==c2.kursprod)
 {
  cout<<"name= "<<c1.name<<endl;
  cout<<"adress= "<<c1.adress<<endl;
  cout<<"tel= "<<c1.tel<<endl;
 }
 else
 {
  cout<<"name= "<<c2.name<<endl;
  cout<<"adress= "<<c2.adress<<endl;
  cout<<"tel= "<<c2.tel<<endl;
 } 
 cout<<endl;
 system("pause");
}




??
 
: 09:03. GMT +3.
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
@Mail.ru