Erster Commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user