Skip to content

Instantly share code, notes, and snippets.

@atrisovic
Last active November 11, 2016 13:44
Show Gist options
  • Save atrisovic/0998e42590db507c4b23eb07c790aab7 to your computer and use it in GitHub Desktop.
Save atrisovic/0998e42590db507c4b23eb07c790aab7 to your computer and use it in GitHub Desktop.
Pavle 2
/*
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