Skip to content

Instantly share code, notes, and snippets.

@ProZhar
Created December 7, 2015 08:13
Show Gist options
  • Select an option

  • Save ProZhar/465a1aa6a0b0cbb445e1 to your computer and use it in GitHub Desktop.

Select an option

Save ProZhar/465a1aa6a0b0cbb445e1 to your computer and use it in GitHub Desktop.
com.javarush.test.level10.lesson11.home01
package com.javarush.test.level10.lesson11.home01;
/* Правильный ответ: d=2.941
Добавить одну операцию по преобразованию типа, чтобы получался ответ: d=2.941.
Пример вывода: 2.9411764705882355
*/
public class Solution
{
public static void main(String[] args)
{
int a = 50;
int b = 17;
double d =(double) a / b;
System.out.println(d);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment