,   CyberForum.ru

- C++


C++ http://www.cyberforum.ru/cpp-beginners/thread586473.html
dg1->Rows->Clear();// ifstream infile (StrToChar(openFileDialog1->FileName));// openFileName = openFileDialog1->FileName; char c; counter = 0;// 0 while (!infile.eof()) {// , infile.getline(c,255, '\t'); if (infile.eof())// ...
C++ ? WIN API , ? http://www.cyberforum.ru/cpp-beginners/thread586447.html
C++
))) , , . .
C++
. void __fastcall TForm1::Button1Click(TObject *Sender) { AnsiString aE,bE,cE; float a,b,c,d,x1,x2; Label5->Caption="D="+FloatToStr(d); Label6->Caption="x1="+FloatToStr(x1); Label7->Caption="x2="+FloatToStr(x2);
C++ B... http://www.cyberforum.ru/cpp-beginners/thread586374.html
2n. B (n), - C (n) .
C++ ? // l3.cpp : Defines the entry point for the console application. // - (x+y*i), i - -1. // z1=1+3i #include "stdafx.h" using namespace std; class ComplexNumber

Xz
: n/a
25.05.2012, 14:27    
. : , , , . :
-
- , .

, . case 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
#include<iostream.h>
#include<string.h>
#include<iomanip.h>
#include<windows.h>
#include<conio.h>
 
int main()
{
    SetConsoleCP(1251);
    SetConsoleOutputCP(1251);
 
struct notebook
{char family[20];
char name[20];
int day,month,year;
char telephone[11];
};
 
struct notebook *tr;
tr=new notebook[50];
 
int i,n,m=0,nom,min=30;
 
cout<<"Ââåäèòå êîëè÷åñòâî ÷åëîâåê"<<endl;
cin>>n;
for(i=0;i<n;i++)
{cout<<"Ââåäèòå ô*ìèëèþ(ç*ãë*â*ûìè áóêâ*ìè)"<<endl;
cin>>tr[i].family;
cout<<"Ââåäèòå èìÿ"<<endl;
cin>>tr[i].name;
cout<<"Ââåäèòå ä*òó ðîæäå*èÿ"<<endl;
cout<<"äå*ü: ";
cin>>tr[i].day;
while(tr[i].day>30)
 {cout<<"îøèáê*, ïîïðîáóéòå ñ*îâ*"<<endl;
 cin>>tr[i].day;}
cout<<"ìåñÿö: ";
cin>>tr[i].month;
while(tr[i].month>12)
 {cout<<"îøèáê*, ïîïðîáóéòå ñ*îâ*"<<endl;
 cin>>tr[i].month;}
cout<<"ãîä: ";
cin>>tr[i].year;
while(tr[i].year>2012)
 {cout<<"îøèáê*, ïîïðîáóéòå ñ*îâ*"<<endl;
 cin>>tr[i].year;}
cout<<"Ââåäèòå *îìåð òåëåôî**"<<endl;
cin>>tr[i].telephone;}
system("cls");
 
while(m!=4)
{
cout<<"Âûáåðèòå:"<<endl;
cout<<"'1'-ñïèñîê ô*ìèëèé â *ëô*âèò*îì ïîðÿäêå ñ óê*ç**èåì *îìåðîâ òåëåôî*îâ"<<endl;
cout<<"'2'-ñïèñîê ëèö, êîòîðûõ *åîáõîäèìî ïîçäð*âèòü ñ ä*åì ðîæäå*èÿ â ç*ä***îì ìåñÿöå"<<endl;
cout<<"'3'-*îâûé ââîä ä***ûõ"<<endl;
cout<<"'4'-âûõîä"<<endl;
 
cin>>m;
switch(m)
 
{case 1:
      {
      cout<<"----------------------------------------------------------"<<endl;
      cout<<"|          Ô*ìèëèÿ          |      Íîìåð òåëåôî**        |"<<endl;
      cout<<"----------------------------------------------------------"<<endl;
     
/*for(j=0;j<n;j++)
      cout<<"|"<<setw(26)<<tr[h[j]].family<<" | "<<setw(16)<<"8"<<tr[h[j]].telephone<<" | "<<endl;*/
     
      
      cout<<"----------------------------------------------------------"<<endl;
      cout<<"Í*æìèòå ëþáóþ êë*âèøó äëÿ ïðîäîëæå*èÿ";
      getch();
      system("cls");
      break;}
 
case 2:
     {
     cout<<"Ââåäèòå *îìåð ìåñÿö*"<<endl;
     cin>>nom;
     while (nom>12)
      {cout<<"îøèáê*, ïîïðîáóéòå ñ*îâ*"<<endl;
      cin>>nom;}
      cout<<endl;
      cout<<"--------------------------------------------------------"<<endl;
     cout<<"|        Ô*ìèëèÿ        |         Ä*ò* ðîæäå*èÿ        |"<<endl;
     cout<<"--------------------------------------------------------"<<endl;
     
     for(i=0;i<n;i++)
     {if(tr[i].month==nom)
     if (tr[i].day<min) min=tr[i].day;}
     
     for(i=0;i<n;i++)
     {if((tr[i].day==min) && (tr[i].month==nom))
     cout<<"|*"<<setw(22)<<tr[i].family<<"|"<<setw(22)<<tr[i].day<<"."<<tr[i].month<<"."<<tr[i].year<<"*|"<<endl;
     else if((tr[i].day!=min) && (tr[i].month==nom))
     cout<<"|"<<setw(23)<<tr[i].family<<"|"<<setw(23)<<tr[i].day<<"."<<tr[i].month<<"."<<tr[i].year<<"|"<<endl;}
     
     cout<<"--------------------------------------------------------"<<endl;
     cout<<"Í*æìèòå ëþáóþ êë*âèøó äëÿ ïðîäîëæå*èÿ";
     getch();
     system("cls");
     break;}
 
case 3:
     {system("cls");
     return main();
     break;}
     
case 4:
     {system("cls");     
     delete []tr;
     break;}    
  
default:cout<<"îøèáê*"<<endl;}}
system("pause");
return 0;
}
.
 
: 14:34. GMT +3.
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
@Mail.ru