1
.
Borland C
, . : , , (), , , Help-.
bc.exe . . , . ( ) , . . - , , . . : , , , , .
. . , ( Message). . :
ü Fatal, ;
ü Error, , , ;
ü - Warning, . , , .
( ) , .
. Alt , . - F10. . .
ü File- .
ü Edit- .
ü Search- .
ü Run - .
ü Compile- .
ü Debug- .
ü Project- .
|
|
ü Options- .
ü Window- .
ü Help- .
ü Ctrl-Shift, .
.
1. Borland C++.
2. , Options-Directories
3. File-New ( , , ). .
4. File-Save As ( , )
#include<stdio.h>// printf() scanf() #include<conio.h>// ? | |
char s[ ]=" ?", name[12];// | |
. | void main() { |
int price; // clrscr(); printf("\n\t pp- \n\n\n"); printf("\n\t%s ",s); // ? fflush(stdin);// scanf("%s",&name); // ? printf("\n\t %s, ? \n\t\t 1 () / 0 ()", name); fflush(stdin); scanf("%s",&price); if(price==1) printf("\n , %s, ", name); else printf ("\n, %s, ", name); | |
. | } |
5. Ctrl+F9 , . , . ( Alt+F5, ).
6. . .
ü , Shift , , , .
ü Ctrl+Insert.
ü .
ü Shift+Insert.
7. Output, . , : Output . ( F7). Output.
8. ( , , , .).
|
|
9. ( Watch):
ü Debug-Watches-Add watch Add Watch);
ü Watch Expression price;
ü ;
ü F4 - . , price Watch. ;
ü name. .
10. , :
ü ;
ü - ;
ü ;
ü BC.
11. . .
- Borland C?
- Borland C?
- - ?
- Borland C ?
- ?
- ?
- Borland C?
- ?
- ?
- ?
2
.
. - .
. , , . , . , , .
< > <> [=<>];
< > - , ;
<> - , ( , ..);
<> - ( ), .
1.
1
( ) | ||
int | ||
float | ||
double | ||
char |
( - ) - . #include<stdio.h>
-: .
- .
printf (< > [,<>]); :
- , , ;
|
|
- , .
, . .
%[<>][<>][.<>]< > :
<> - , (- - , + ..);
<> - , ;
<> - , , ;
- , , .
:
c ;
d - ;
f - ;
e - ;
s - .
printf (, , ) .
scanf (< > [,< >]); :
< > - , ;
< > - , .
printf scanf , . & ( ).
scanf
%[<>]< >, :
<> - , ;
< > - , , , .
c ;
d - ;
g - ;
s - .
- , . getchar().
Sy = getchar();
getchar() Sy.
getchar getch(). . .
Getch();
, - .
putchar().
putchar (<>); :
|
|
<> - ( ).
-
gets(< >) puts(< >)
< > - , .
.
2.1 - , : , , , . 1.
1
.
---- |, ):
:
printf(--------------------------------);
printf(| |);
:
printf("%c", ), , 2.
2
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 176: ░ ▒ ▓ │ ┤ ╡ ╢ ╖ ╕ ╣ ║ ╗ ╝ ╜ ╛ ┐ └ 192: └ ┴ ┬ ├ ─ ┼ ╞ ╟ ╚ ╔ ╩ ╦ ╠ ═ ╬ ╧ ╨ 208: ╨ ╤ ╥ ╙ ╘ ╒ ╓ ╫ ╪ ┘ ┌ █ ▄ ▌ ▐ ▀ |
2.1 2.1 , , ,
2.2 .
S= , p= .
2.3 , :
ü ;
ü - 2.3 .
1. ?
2. ?
3. ?
4. ? ?
5. ? ?
6. ?
7. ?
8. ?
9. ?
10. ?
3