.


:




:

































 

 

 

 


-




, (. 5.2).

, , . .

(. 5.10) : , , (. 6.3).

( ) - . . Windows DOS. CharToOem.

:

CharToOem(,);

CharToOem ();

;

() ;

, ;

() ;

; .

() (). .

CharToOem ( , buf) buf .

! , (buf) .

CharToOem . windows.h #include <windows.h>.

. 6.3. 5.2

 

. 6.3.

. 6.3.

5.2

/* */

#include <stdlib.h>

#include <stdio.h> /* */

#include <conio.h> /* */

#include <windows.h> /* CharToOem*/

main() /* */

{

float c[7], /* */

p[7], /* */

pro; /* */

int n, i, /* , */

t; /* , */

char buf1[40], buf2[40]; /* */

/* */

do /* */

{

clrscr(); /* */

CharToOem(" ( 1 7): ",buf1);

printf("%s",buf1);

scanf("%d", &n); /* */

for(i=0; i < n; i++) /* ( ) */

{

CharToOem(" c",buf1);

CharToOem(". .:",buf2);

printf("%s (%d), %s", buf1,i+1,buf2);

scanf("%f", &c[i]); /* */

}

CharToOem(" , .:",buf1);

printf("%s",buf1);

scanf("%f", &pro); /* */

/* */

CharToOem("\n ....: ",buf1);

CharToOem(". \n",buf2);

printf("%s %.1f %s",buf1,pro,buf2);

printf(" +++\n");

CharToOem(" | | |\n",buf1);

CharToOem(" | c(i) | (i) |\n",buf2);

printf("%s%s",buf1,buf2);

printf(" +++\n");

for(i=0; i < n; i++) /* - ( ) */

{

p[ i ] = (c[ i ] * pro) / 100.;/* p[ i ] */

/* */

printf(" | %9.2f | %9.3f |\n", c[ i ], p[ i ]);

}

printf(" +++\n");

CharToOem(" - 1, \n 0

: ",buf1);

printf("%s",buf1);/* */

scanf("%d", &t);/* , ( )*/

}while(t==1);/* */

} /* */

7 25. 492. 503. 948. 738. 892. 320. 250. .

6.1.





:


: 2015-11-23; !; : 385 |


:

:

, .
==> ...

1518 - | 1418 -


© 2015-2024 lektsii.org - -

: 0.009 .