Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Determine a value is INTEGER
#14
@DSMan195276 - one should be able to integrate C/C++ functions using Declare . . . Can't one integrate the floor() function to determine an integer? Is that possible?

I don't have the nerve to try this out anymore. But it should work . . .
The example in C:

Code: (Select All)

//Ganzzahlwert einer eingegebenen Zahl ermitteln - 27. Juli 2024

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int main (void)
{
  float wert1, wert2, wert3, wert4;

printf("\nDen Ganzzahlwert einer eingegebenen Zahl ermitteln");
printf("\n==================================================");

printf("\n\nGegebene Werte: 1.6 - 1.2 - 2.8 - 2.3\n\n");

  wert1 = 1.6;
  wert2 = 1.2;
  wert3 = 2.8;
  wert4 = 2.3;

  printf("Wert-1 = %.1f\n", floor(wert1));
  printf("Wert-2 = %.1f\n", floor(wert2));
  printf("Wert-3 = %.1f\n", floor(wert3));
  printf("Wert-4 = %.1f\n", floor(wert4));
 
  return(0);
}
Reply


Messages In This Thread
Determine a value is INTEGER - by TerryRitchie - 07-25-2024, 07:40 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 12:17 AM
RE: Determine a value is INTEGER - by Pete - 07-26-2024, 12:23 AM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 02:33 AM
RE: Determine a value is INTEGER - by Pete - 07-26-2024, 02:41 AM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 12:25 PM
RE: Determine a value is INTEGER - by Petr - 07-26-2024, 03:02 PM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 05:25 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-26-2024, 07:02 PM
RE: Determine a value is INTEGER - by Jack - 07-26-2024, 08:14 PM
RE: Determine a value is INTEGER - by Kernelpanic - 07-26-2024, 10:57 PM
RE: Determine a value is INTEGER - by DSMan195276 - 07-27-2024, 04:30 AM
RE: Determine a value is INTEGER - by Kernelpanic - 07-27-2024, 05:03 PM
RE: Determine a value is INTEGER - by SMcNeill - 07-27-2024, 01:49 PM
RE: Determine a value is INTEGER - by bplus - 07-27-2024, 02:43 PM



Users browsing this thread: 2 Guest(s)