.


:




:

































 

 

 

 





Watch , .

(F10) :

1 2 3

1 2 1

1 2 3

0 2 3

0 0 2

0 0 0

, . , , 孭. , , , , .

 

 

2 ( Ivanov2). , .

 

:

:

:

,

, ,

.

(, ,

.)

 

.

 

(Watch) , , :

1) 2 3 5 2) 2 -2 3 3) 2 -2 3

3 -2 12 4 -4 6 4 -4 7

, .

.

 

2

switch

 

, '', '', '' .

.

 

#include<iostream> //!!! /

#include <math.h>

#include <conio.h>

#include <windows.h>

using namespace std;

//!!!

int main()

{

if(SetConsoleCP(1251)==0)

//

{

cerr<<"Fialed to set codepage!"<<endl;

/* , */

}

if(SetConsoleOutputCP(1251)==0)//

{

cerr<<"Failed to set OUTPUT page!"<<endl;

}

cout<<" : "<<endl;

char ch=0;

// , :

int counta = 0, countu = 0, counto = 0, count = 0;

while((ch=cin.get())!='\n')

{

switch (ch)

{

case '':

case '': counta++; break;

case '':

case '': countu++; break;

case '':

case '': counto++; break;

// :

default: if (ch>32 || ch < 0) count++;

}

}

cout<<" \"\" = " << counta << endl;

cout<<" \"\" = " << countu << endl;

cout<<" \"\" = " << counto << endl;

cout<<" = " << count << endl;

_getch();

/* <F5>, , c */

return 0;

}

 

switch while. get(). '\n', <Enter>. <Enter>, .

.

 

 

, double, , (+ - * / % ^) double. switch ( ). ^ . C pow(x,y), x y. , , #include <math.h>

<Esc>.

.


2

: , ().

1





:


: 2016-11-24; !; : 979 |


:

:

! . .
==> ...

1665 - | 1455 -


© 2015-2024 lektsii.org - -

: 0.01 .