package step.ed.module03;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
	5. Ñêîëüêî òîâàðà öåíîé Y ìîæíî êóïèòü íà Õ ãðèâåí è ñêîëüêî ïîëó÷èòü ñäà÷è?
 */

public class M03T05 {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
		
		System.out.print("Ââåäèòå ñóììó: ");
		double sum = Double.parseDouble(bufferedReader.readLine());
		
		System.out.print("Ââåäèòå öåíó òîâàðà: ");
		double price = Double.parseDouble(bufferedReader.readLine());
		
		System.out.println("Êîë-âî: " + ((int)(sum / price)));
		System.out.println("Ñäà÷à: " + (sum % price));
	}
}
