18 lines
365 B
C
18 lines
365 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
// data [floating point type] --> 12.7
|
|
// 12.7 - 12 = 0.7
|
|
|
|
int main(void) {
|
|
float data;
|
|
|
|
printf("Enter data from floating point type: ");
|
|
scanf("%f", &data);
|
|
|
|
printf("The Integer Part = %d \n", (int)data);
|
|
printf("The Decimal Part (after the floating point) = %f \n", data - (int)data);
|
|
|
|
return 0;
|
|
}
|