Physics, asked by kartiksharma9095, 9 months ago

Write a program that accepts a number as input, and prints just the decimal portion.

Answers

Answered by nidaeamann
0

Answer:

Here is the code in explanation.

Explanation:

this is the simplest code to get decimal no. we used float as input and will print as integer .

In integer data time there is no numeric value after the complete no. so simple conversion of data time can solve the problem.

#include <stdio.h>

int main()

{

   float input = 313.313;

   int output = input;

   printf("%d %f\n",output);

   return 0;

}

Similar questions