Created
November 16, 2016 09:48
-
-
Save tonyblaze27/3a2fe6c3d66299bc7ba4145b76e91533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ConsoleApplication8 | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
int input = Convert.ToInt32(Console.ReadLine()); | |
float a = input / 100%10; | |
float b = input / 10%10; | |
float c = input / 1% 10; | |
float rezultat; | |
if ( c == 0) | |
{ | |
rezultat = a * b; | |
} | |
else if ( c!= 0 && c <= 5) | |
{ | |
rezultat = (a * b) / c; | |
} | |
else | |
{ | |
rezultat = (a * b) * c; | |
} | |
Console.WriteLine("{0:F2}", rezultat); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment