,   CyberForum.ru

( ) - C++

 
:  :  - 11,   - 4.82
DenJKEEEE
: n/a
20.06.2010, 20:18     ( ) #1
, . , ...
... ...
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#include <iostream.h>
#include <math.h>
#include <stdio.h>
#include <windows.h>
 
int main()
{
    SetConsoleCP(1251); //ïîäêëþ÷å*èå ðóñ.ÿçûê*
    SetConsoleOutputCP(1251);
    
 
    int x;
    while (x!=0)
    {
    
    cout<<"Ââåäèòå 1 äëÿ ð*ñ÷åò* ì*ññû"<<"\n";
    cout<<"Ââåäèòå 2 äëÿ ð*ñ÷åò* âðåìå*è"<<"\n";
    cout<<"Ââåäèòå 3 äëÿ ð*ñ÷åò* äëè**û"<<"\n";
    cout<<"Ââåäèòå 4 äëÿ ð*ñ÷åò* îáüåì*"<<"\n";
    cout<<"Ââåäèòå 5 äëÿ ð*ñ÷åò* ïëîù*äè"<<"\n";
    cout<<"Ââåäèòå 6 äëÿ ð*ñ÷åò* ñêîðîñòè"<<"\n";
    cout<<"Ââåäèòå 7 äëÿ ð*ñ÷åò* òåìïåð*òóðû"<<"\n";
    cout<<"Ââåäèòå 0 äëÿ ç*âåðøå*èÿ ð*áîò*û"<<"\n";
    cin>>x;
    
  switch (x)
    {
    case 1:
    double n; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ  ð*ñ÷åòû ì*ññû
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* ì*ññû n=";
    cin>>n;
    cout <<"\n";
    cout<<"Ì*ññ*"<<"\n";
    cout <<"\n";
    double kg; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êèëîãð*ììû
    kg=n; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kg<<" êèëîãð*ìì"<<"\n"; //âûâîä ðåçóëüò*ò*
    double gr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ãð*ììû
    gr=n*1000; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<gr<<" ãð*ìì"<<"\n"; //âûâîä ðåçóëüò*ò*
    double mgr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìèëèãð*ììû
    mgr=n*1000000; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<mgr<<" ìèëëèãð*ìì"<<"\n"; //âûâîä ðåçóëüò*ò*
    double ka; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ê*ð*òû
    ka=n*5000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<ka<<" ê*ð*ò"<<"\n"; //âûâîä ðåçóëüò*ò*
    double tn; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â òî**û
    tn=n/1000; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<tn<<" òî**"<<"\n"; //âûâîä ðåçóëüò*ò*
    double un; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ó*öèè
    un=n*35.27396194958041;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<un<<" ó*öèé"<<"\n"; //âûâîä ðåçóëüò*ò*
    double ft; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ôó*òû
    ft=n*2.204622621848776;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<ft<<" ôó*òîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    cout <<"\n";
    break;
 
    case 2:
    double a; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû âðåìå*è
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* âðåìå*è a=";
    cin>>a;
    cout <<"\n";
    cout<<"Âðåìÿ"<<"\n";
    cout <<"\n";
    double day; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ä*è
    day=a;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<day<<" ä*åé"<<"\n"; //âûâîä ðåçóëüò*ò*
    double hr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ÷*ñû
    hr=day*24;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<hr<<" ÷*ñîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double mn; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìè*óòû
    mn=a*1440;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<mn<<" ìè*óò"<<"\n"; //âûâîä ðåçóëüò*ò*
    double sec; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ñåêó*äû
    sec=mn*60;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<sec<<" ñåêó*ä"<<"\n"; //âûâîä ðåçóëüò*ò*
    break;
 
    case 3:
    cout<<"\n";
    double b; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû äëè*û
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* äëè**û b=";
    cin>>b;
    cout<<"\n";
    cout<<"Äëè**"<<"\n";
    cout<<"\n";
    double metr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìåòð
    metr=b;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<metr<<" ìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double sm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ñ**òèìåòð 
    sm=b*100;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<sm<<" ñ**òèìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double dm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â äþéì
    dm=b*39.37007874015748;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<dm<<" äþéìîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double km; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êèëîìåòðû
    km=b/1000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<km<<" êèëîìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double ml; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìèëëèìåòðû
    ml=b*1000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<ml<<" ìèëëèìåòðû"<<"\n"; //âûâîä ðåçóëüò*ò*
    double mile; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìèëè 
    mile=b/1598;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<mile<<" ìèëü"<<"\n"; //âûâîä ðåçóëüò*ò*
    double mmile; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìîðñêèå ìèëè
    mmile=b/1852;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<mmile<<" ìîðñêèõ ìèëü"<<"\n"; //âûâîä ðåçóëüò*ò*
    double fut; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ôóòû
    fut=b*3.280839895013123; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<fut<<" ôóòîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double yrd; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ÿðäû
    yrd=b*1.10; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<yrd<<" ÿðäîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    break;
 
    case 4:
    cout<<"\n";
    double c; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû îáüåì*
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* îáüåì* c=";
    cin>>c;
    cout<<"\n";
    cout<<"Îáüåì"<<"\n";
    cout<<"\n";
    double ltr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ëèòðû
    ltr=c;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<ltr<<" ëèòð*\\îâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kd; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êóáè÷åñêèå äþéìû
    kd=c*61.023744;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kd<<" êóáè÷åñêèõ äþéìîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kubm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êóáè÷åñêèå ìåòðû
    kubm=c/1000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kubm<<" êóáè÷åñêèõ ìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kusm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êóáè÷åñêèå ñ**òèìåòðû
    kusm=c*1000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kusm<<" êóáè÷åñêèõ ñ**òèìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kuft; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êóáè÷åñêèå ôóòû
    kuft=kubm*35,3; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kuft<<" êóáè÷åñêèõ ôóòîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kyrd; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êóáè÷åñêèå ÿðäû
    kyrd=kubm*1.3;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kyrd<<" êóáè÷åñêèõ ÿðäîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    cout<<"\n";
    break;
    
    case 5:
    double d; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû ïëîù*äè
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* ïëîù*äè d=";
    cin>>d;
    cout<<"\n";
    cout<<"Ïëîù*äü"<<"\n";
    cout<<"\n";
    double kkm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êâ*äð*ò*ûå êèëîìåòðû 
    kkm=d;  //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kkm<<" êâ*äð*ò*ûõ êèëîìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double akr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â *êðû
    akr=d*247.1; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<akr<<" *êðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double gktr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ãåêò*ðû
    gktr=d*100; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<gktr<<" ãåêò*ð"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kkkv; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êâ*äð*ò*ûå ìåòðû
    kkkv=d*1000000;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kkkv<<" êâ*äð*ò*ûõ ìåòðîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kvm; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êâ*äð*ò*ûå ìèëè
    kvm=kkkv*3.86; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kvm<<" êâ*äð*ò*ûõ ìèëü"<<"\n"; //âûâîä ðåçóëüò*ò*
    cout<<"\n";
    break;
 
    case 6:
    double e; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû ñêîðîñòè
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* ñêîðîñòè e=";
    cin>>e;
    cout<<"\n";
    cout<<"Ñêîðîñòü"<<"\n";
    cout<<"\n";
    double msec; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ì/c
    msec=e; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<msec<<" ìåòðîâ â ñåêó*äó"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kmch; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â êì/÷
    kmch=e*3.6; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kmch<<" êèëîìåòðîâ â ÷*ñ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double mlch; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ìèëü/÷
    mlch=e*2.2; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<mlch<<" ìèëü â ÷*ñ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double sms; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ñì/c
    sms=e*100; //ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<sms<<" ñ**òèìåòðîâ â ñåêó*äó"<<"\n"; //âûâîä ðåçóëüò*ò*
    double uzl; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â óçëû
    uzl=e*1.94;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<uzl<<" óçëîâ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double fts; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ôò/c
    fts=e*3.28;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<fts<<" ôóòîâ â ñåêó*äó"<<"\n"; //âûâîä ðåçóëüò*ò*
    cout<<"\n";
    break;
 
    case 7:
    double f; // ñîçä*åì îñ*îâóþ ïåðåìå*óþ ñ ïîìîùüþ êîòîðîé áóäóò ïðîèçâîäèòüñÿ ð*ñ÷åòû òåìïåð*òóðû 
    cout<<"ââåäèòå òðåáóåìîå ÷èñëî äëÿ ð*ñ÷åò* òåìïåð*òóðû f=";
    cin>>f;
    cout<<"\n";
    cout<<"Òåìïåð*òóð*"<<"\n";
    cout<<"\n";
    double ce; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ãð*äóñû Öåëüñèÿ
    ce=f;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<ce<<" ãð*äóñîâ öåëüñèÿ"<<"\n"; //âûâîä ðåçóëüò*ò*
    double kel; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ãð*äóñû Êåëüâè**
    kel=f*274.15;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<kel<<" ãð*äóñîâ êåëüâè**"<<"\n"; //âûâîä ðåçóëüò*ò*
    double fr; // îáúÿâëå*èå âñïîìîã*òåëü*îé ïåðåìå**îé äëÿ ïåðåâîä* â ãð*äóñû Ô*ðå*ãåéò* 
    fr=f*33.8;//ð*ñ÷åò**ÿ ôîðìóë* 
    cout<<fr<<" ãð*äóñîâ Ô*ðå*ãåéò*"<<"\n"; //âûâîä ðåçóëüò*ò*
    cout<<"\n";
    break;
    }
    }
    
    return 0;
}
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
20.06.2010, 20:18     ( )
:

(-) 2 / C++
- C++
C++ - 2
-()? C++
++ C++
, - C++
C++ -
C++



:
.

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