.


:




:

































 

 

 

 





 

.

 

.

(, , , ) . [ 12]. Sobyt

 

.

++ . , , .

, , , , . , , . ( ;):

struct Sobyt{

int hour, min;

char theme[100], name[100];

int num;

};

Sobyt. , , , :

Sobyt e1, e2[10]; //

, , :

struct {

int hour, min;

char theme[100], name[100];

int num;

} e1, e2[10];

, :

Sobyt *pe = new Sobyt; //

Sobyt *pm = new Sobyt[m]; // m

 

. , , , . ( -> ), :

e1.hour = 12; e1.min = 30;

strcnpy(e2[0].theme, Ҕ, 99);

pe->num = 30; // (*pe).num = 30;

pm[2].hour = 14; // (*(pm+2)).hour = 14;

:

*pe = e1; pm[1] = e1; pm[4] =e2[0];

 

, . , , . .

/ , , . :

// - <iostream.h>

cin>>e1.hour>>e1.min;

cin.getline(e1.tneme,100);

cout<<e1.hour<< <<e1.min<< <<e1.theme<<endl;

// - (<stdio.h>)

scanf(%d%d, &e1.hour, &e1.min; gets(e1.theme);

printf(%d %d %s, e1.hour, e1.min, e1.theme);

 

( ) :

Sobyt e3 = {12, 30, , 25};

 

, ( ). - (..3). , , . :

# include <iostream.h>

# include <stdio.h>

# include <string.h>

# define n 25 // const int n=25; -

void main()

{struct stud {

char fam[20]; //

char mr[8]; //

}std[n],*p=&std[0]; // 25

//

int i;

char mes[8];

for(i=0;i<n;i++,p++) //

{cout<<"\n"<<" \n";

cin>>((*p).fam); //

cout<<'\n'<<" \n";

cin>>(*p).gr;

}

p-=n; //

cout<<"\n"<<" \n";

cin>>mes;

for(i=0;i<n;i++,p++)

if(strcmp(std[i].mr,mes)==0) //

//

cout<<(*p).fam<<"\n"; // ,

//

}

 

 

.3. - ,

 

.

++. 3-4 .

, . - -. ?

 

5. :

:

1) ;

2)

 

.

 

1. : , , . , 33 .

2. : , , . , .

3. : , , . .

4. : , , . .

5. , , : , , , . .

6. : , , . , , .

7. , (20 ): , , . , 3 , .

8. : , , , . . : .

9. : , , . , .

10. : , , , . , .

11. : , , . , , .

12. : , , , . .

13. : , , , . , .

14. : , , , . , , .

15. , : , , , . .

16. , , : , , (, , ..), , . , .

17. , : , , . , .

18. , : , , . 3- .

19. , : , , , .

20. , . .

21. , : () , , . , .

22. , : , , . , .

23. , : , , , . , .

24. , : , , . , , .

25. : , , . .

26. , .

27. : , , ( ) , .

28. : , , ( ) , 4 5.

29. : , , ( ) , , 4.0.

30. : , , , 1- .

 

1. .

2. ?

3. .

4. .

5. ?

6. ?

7. ()?

8. ?

9. ?

 

4.





:


: 2016-11-18; !; : 1584 |


:

:

, ; , .
==> ...

1901 - | 1689 -


© 2015-2024 lektsii.org - -

: 0.018 .