Задача :2.Пренасяне на тухли на Java
Здравей!
Получавам 90 точки :( Къде греша?
Условие : https://github.com/stefkavasileva/SoftUni-Software-Engineering/blob/master/Programming%20Basics/Exams/SampleCoding101Exam-Jan2016/README.md
https://judge.softuni.bg/Contests/Practice/Index/661#1
................................
import java.util.Scanner; public class TEST_02_Bricks { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double bricks = Double.parseDouble(scanner.nextLine()); double workers = Double.parseDouble(scanner.nextLine()); double volume = Double.parseDouble(scanner.nextLine()); double kurs = volume*workers ; double needKursove = bricks/kurs; if( needKursove > 1 ) { System.out.printf( "%f", Math.ceil(needKursove)) ; } else { System.out.print("1");} } }
Благодаря ! Нямаше да се сетя скоро :)