namespace LogarithmusDualis
{
internal class Programm
{
static void Main()
{
string userInput;
int userInteger,
originalInput,
output = 0;
Console.Write("\n LogarithmusDualis " +
"\n================================" +
"\n Geben Sie eine ganze Zahl ein." +
"\n ");
userInput = Console.ReadLine();
int.TryParse(userInput, out userInteger);
originalInput = userInteger;
while (userInteger / 2 > 0)
{
userInteger = userInteger / 2;
output++;
}
Console.Write($"\n {originalInput} kann {output} x durch Zwei dividiert werden. ");
Console.Write("\nZum Beenden bitte Eingabetaste drücken ...");
Console.ReadLine();
Console.Clear();
}
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
IxI-Enki/Uebung-032
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Logarithmus Dualis (ld)
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published