Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Diese Zeile soll ich so um bauen das sie mir das gleiche ergebnis ausgibt

aber als integer!

e = (double)p * .512 / 1000;

weis jemand rat

ich habe mir das so gedacht:

l = p * 512 / 1000;

doch das ergebnis ist viel zu hoch!

e = (double)p * .512 / 1000;

Da musst Du schon etwas genauer werden.

Das gleiche Ergebnis wirst Du in den meisten Fällen gar nicht erhalten können. Willst Du ein Ergebnis, bei dem die Nachkommastellen abgeschnitten wurden? Oder ein gerundetes Ergebnis? Oder willst Du wirklich Integerarithmetik? Das gibt dann wieder ein anderes Ergebnis.

Und was sind e, p und l?

#include <stdio.h>

int main(void)

{

long p = 19640880;

double e;

long l;

e = (double)p * .512 / 1000;

l = p * 512 /1000;

printf(" %lf\n", e);

printf(" %i\n", l);

return 0;

}

das ist mein code ich hoffe er hilf dir weiter

und es soll Integerarithmetik sein

danke

Hey danke manchmal barauch man einfach nur jemanden der ein auf das ziel schupst ;-)

big thx

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.