- stdio.h.
printf(_,_);
, .
.
#include "stdafx.h"
#include <stdio.h>
void main ()
{
printf ( "\nhello!\n" );
}
#include <stdio.h> -. \n ( ).
, :
% _.
% .
5
- | . |
+ | + -. |
, , -. | |
# |
_ , .
, .
6.
6
N | |
F | |
h | short int |
l | long |
L | long double |
.
7
d | (int) | |
i | (int) | |
o | ||
u | ||
x | (a,b,c,d,e,f) | |
X | (A,B,C,D,E,F) | |
f | [+/-]ddd.dddd | |
e | [+/-]d.dddd | |
g | f, e ( ) | |
E | , e | |
G | , g | |
s | - | |
c | - |
:
Printf(|n summa=%f,summa);
:
Summa=2102.3
:
float c=48.3, e=16.33;
|
|
int k=-83;
printf(\nc=%f\tk=%d\te=%e,c,k,e);
c=48.299999 k=-83 e=1.63300e+01
:
printf(\nc=%5.2f\tk=%5d\te=%8.2f\te=%11.4e,c,k,e,e);
c=48.30 k= -83 e=16.33 e= 1.6330e+01
:
\n ;
\t ;
\r ;
\\ \;
\ ;
\0 ;
\a -;
\b ;
\f ;
\v ;
\? .
scanf(_, _);
. , .
%*_
* ;
_ , , .
printf().
, . & _
:
scanf(%d%f%f,&n,&z,&x);
- , -(<stdio.h>):
puts(const char* ); . .
char *gets(char* s); . .
int putch(int ); .
int getch(void); . , getch 0. , , , , getch . getch , .
cputs(const char* ); .
<math.h> :
int abs (int ); double fabs(double x); (abs) (fabs) , .
Double acos (double x);
Double asin (double x);
Double atan (double x);