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.

Hausaufgabe

Empfohlene Antworten

Veröffentlicht

Also ich hab da ne aufgabe bei der ich i-wie nich weiter komm um schon mal klar zu stellen: ich hab eben erst angefangen c zu lernen. So zur aufgabe:

Schreiben Sie ein Programm, welches den Wert c nach folgender Gleichung berechnet und ausgibt:

c = a - 4,5 * b - b * 10,2

die Werte für a und b sind vorher vom Anwender einzugeben. Bei a, b und c handelt es sich um Variablen vom Datentyp float.

Danke schonmal im Voraus.:confused:

#include <stdio.h>

#include <stdlib.h>

#include <conio.h>

#include "Utilities.h"

int main(void)

{

float a, b, c;

_gotoxy(5,6);

scanf("%d", &a);

_gotoxy(5,7);

scanf("%d", &B);

_gotoxy(5,8);

printf("c = %d");

printf("%d = %d - 4,5 * %d - %d * 10,2, c, a, b, B);

while (_kbhit() == 0);

return EXIT_SUCCESS;

}

//so das ist er wahrscheinlich muss da alles noch überarbeitet werden

Bearbeitet von Tony Damager

und auserdem wozu gibt es bord regeln wenn keiner sie ließt. Ich hoffe es wird dir erstmal keiner helfend a der Thread titel ja mal sowas von Aussagekräftig ist. Lest die rules und postet dann....

Wieso werden floats als int eingelesen?

Warum werden die conio-Methoden verwendet?

Was ist das:

printf("c = %d");

Und wie Klotzkopp schon sagte:

Wo ist die Berechnung von c?

Wieso verwendest du <conio.h>?

Der Include ist für cout << und cin >>

Wieso verwendest du <conio.h>?

Der Include ist für cout << und cin >>

Nein. conio sind plattformspezifische Konsolenbefehle.

cin/cout ist aber C++-Standard und erstens in <iostream> definiert und zweitens gehts um C und nicht C++.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.