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

Hallo zusammen. Bin C-Anfänger und hab da mal eine Frage:

Wie kann ich wenn ich beispielsweise den Wert 6,333333333 Stunden habe die 0,33333333 als 20 min ausgeben lassen?

danke für eure Hilfe :)

ich vergas zu erwähnen, dass sich die Stunden berechnen...

Hier mal der Quelltext:

#include <stdio.h>

void main()

{

int entf,geschw,min;

float verb,erg2,erg1;

printf("Entfernung zum Ziel: ");

scanf("%d",&entf);

printf("Reisegeschwindigkeit (in km/h): ");

scanf("%d",&geschw);

printf("Benzinverbrauch in l/100kmh: ");

scanf("%f",&verb);

erg1=entf*verb/100;

erg2=entf/geschw;

printf("Gesamtverbrauch: %f\n",erg1);

printf("Zeitdauer: %f",erg2);

getch();

}

Mir wurde irgendwas mit modulo gesagt also % aber rat hier schon den ganzen morgen rum :/

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.