double and float
This commit is contained in:
parent
2255d2f5ca
commit
7b90c42e43
1 changed files with 17 additions and 0 deletions
17
c-basic/double.c
Normal file
17
c-basic/double.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
float f;
|
||||
double d;
|
||||
|
||||
printf("float :");
|
||||
scanf("%f", &f);
|
||||
|
||||
printf("double :");
|
||||
scanf("%lf", &d);
|
||||
|
||||
printf("f = %f, d = %f", f, d);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue