Skip to content

Instantly share code, notes, and snippets.

@emad-elsaid
Forked from anonymous/gist:d846bfb7e40328bc8275
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emad-elsaid/7bf23065ee12022c212c to your computer and use it in GitHub Desktop.
Save emad-elsaid/7bf23065ee12022c212c to your computer and use it in GitHub Desktop.
double x = 0;
do
{
Console.WriteLine("the num plz");
x = double.Parse(Console.ReadLine());
if (x > 0)
{
Console.WriteLine(x);
}
else if( x > 0 )
{
Console.WriteLine((x * -1));
}
} while (x == 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment