Last active
November 11, 2016 13:44
-
-
Save atrisovic/0998e42590db507c4b23eb07c790aab7 to your computer and use it in GitHub Desktop.
Pavle 2
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
/* | |
zadatak: http://bubblebee.rs/problemi/01-Aritmetika/01-Formule/01-Poznate-formule/08-putovanje | |
*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
// ulaz: prvo brzina pa predjeni put | |
// paznja: realna vrednost -- zato pisemo float | |
float v = float.Parse(Console.ReadLine()); | |
float s = float.Parse(Console.ReadLine()); | |
// sad izracunamo vreme | |
float t = s/v; | |
// ispisemo rezultat na dva decimalna mesta | |
Console.WriteLine(Math.Round(t,2).ToString("0.00")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment