How to remove an integer from an integer with C programming language

it will show removal result. First there will be two float numbers assigned by users.

#include stdio.h
#include stdlib.h
 
minus ( float x, float y )
{
      float z;
      z=x-y;
      return z;
}
 
int main()
{
  float a,b,c; 
  int d;
  printf("Please enter two float digits with space.i.e: 12.322 16.2323n");
  scanf("%f %f", &a, &b);
  c=minus(a,b);
  d=(int)c;
  printf("Result= %d", d);
   
  return 0;
}

Wtih functions, life is easy :)

Sende Fikrini Belirt :)

Yorumunuz: