Editing Java - Einführung

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 38: Line 38:


=== Zuweisungs- und logische Operatoren ===
=== Zuweisungs- und logische Operatoren ===
==== Aufgabe 2.1 Eigenschaften einer Zahl ====
==== Aufgabe 2.2 Eigenschaften einer Zahl ====


Schreibe ein Programm, dass von der Konsole eine Zahl einliest und ausgibt:
Schreibe ein Programm, dass von der Konsole eine Zahl einliest und ausgibt:
Line 49: Line 49:
Tipp: Für die ersten beiden Punkte wirst du die Modulo Funktion brauchen.
Tipp: Für die ersten beiden Punkte wirst du die Modulo Funktion brauchen.


==== Aufgabe 2.2 Arbeits- oder Freizeit? ====
==== Aufgabe 2.3 Arbeits- oder Freizeit? ====


In der CODERS.BAY arbeiten wir von 8:30 bis 15:30 Uhr. Schreibe ein Programm, dass eine Zahl von der Konsole einliest und ausgibt ob die Stunde in der Arbeitszeit liegt oder nicht.
In der CODERS.BAY arbeiten wir von 8:30 bis 15:30 Uhr. Schreibe ein Programm, dass eine Zahl von der Konsole einliest und ausgibt ob die Stunde in der Arbeitszeit liegt oder nicht.
Line 56: Line 56:


=== Assignment and logical operators ===
=== Assignment and logical operators ===
====Exercise 2.1 Characteristics of a number====
====Aufgabe 2.2 Characteristics of a number====


Write a program that reads a number from the console and calculates and prints characteristics of it:
Write a program that reads a number from the console and calculates and prints characteristics of it:
Line 67: Line 67:
Hint: You might find the modulo operation helpful for the first two exercises.
Hint: You might find the modulo operation helpful for the first two exercises.


==== Exercise 2.2 free time or work time? ====
==== Exercise 2.3 free time or work time? ====


At CODERS.BAY we usually work from 8 to 16 o'clock. Write a program, that reads a number from the console and prints whether that hour is during our work time or not.
At CODERS.BAY we usually work from 8 to 16 o'clock. Write a program, that reads a number from the console and prints whether that hour is during our work time or not.

Please note that all contributions to Coders.Bay Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see CB Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)