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,

benötige bitte euren Rat, da ich bei einer Aufgabe in Sachen C++ nicht weiterkomme.

Ich schreibe euch erst mal den Quelltext zu einem Teil hin:

int main ()

{

int zahl1,

zahl2,

zahl3;

cin >> zahl1;

cin >> zahl2;

zahl3 = zahl1 + zahl2;

cout << "zahl3" << endl;

Es geht mir nur um den oberen Bereich der Deklarationen (int).

Dort soll ich eine oder zwei Möglichkeiten finden, den Int-Bereich mit nur zwei Variablen zu deklarieren und nicht mit drei (zahl1, zahl2, zahl3) :confused: . Dennoch ist mir bisher unklar, wie man auf eine der drei zahl-Werte verzichten kann, weil ich auf dem Gebiet C++ ja recht neu bin :( .

Könnt ihr mir weiterhelfen?

Vielen Dank schon mal und viele Grüße,

Hallo zusammen,

vielen Dank für eure schnellen Antworten und die Vorschläge :uli !

Hätte nicht gedacht, dass man es auf diese Arten anders schreiben kann.

Hat mir auf jeden Fall weitergeholfen!

Viele Grüße

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.