Untitled
unknown
plain_text
4 years ago
929 B
4
Indexable
import java.util.Scanner; public class Miniging { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int priceoforvideo = Integer.parseInt(scanner.nextLine()); int priceforoneadapter = Integer.parseInt(scanner.nextLine()); double priceofcurrent = Double.parseDouble(scanner.nextLine()); double profitforoneday = Double.parseDouble(scanner.nextLine()); int totalpriceforcards = 13 * priceoforvideo; int totalpriceforadapter = 13 * priceforoneadapter; int totalsum = totalpriceforadapter + totalpriceforcards + 1000; double profitforday = profitforoneday - priceofcurrent; double totalprofitday = 13 * profitforday; double daytoreturn = totalsum / totalprofitday; System.out.println(totalsum); System.out.println(Math.round(daytoreturn)); } }
Editor is loading...