|
|
вернуться в форумwhy it is wrong (JAVA) import java.util.*; public class taksi { public static void main(String args[]) { Scanner in = new Scanner(System.in); int a = in.nextInt(); int a1 = in.nextInt(); int b = in.nextInt(); int b1 = in.nextInt(); int g = 0; for(int i = b;i>a;i=i-b1) { a=a+a1; if(i>a) g = a; } System.out.println(" kelisken bagasy :"+g); } } |
|
|