@@ -0,0 +1,848 @@
+package java_problems.beginner;%0D%0A%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/*%0D%0A * Write a program to find the remainder when two given numbers are divided.%0D%0A * Input%0D%0A * %0D%0A * The first line contains an integer T, total number of test cases. Then follow%0D%0A * T lines, each line contains two Integers A and B.%0D%0A * %0D%0A * Output: %0D%0A * Find remainder when A is divided by B.%0D%0A * %0D%0A * Constraints: %0D%0A * 1 %3C= T %3C= 1000%0D%0A * 1 %3C= A,B %3C= 10000%0D%0A * %0D%0A * Example %0D%0A * Input:%0D%0A * 3%0D%0A * 1 2%0D%0A * 100 200%0D%0A * 10 40%0D%0A * %0D%0A * Output:%0D%0A * 1%0D%0A * 100%0D%0A * 10%0D%0A */%0D%0Apublic class FindRemainder %7B%0D%0A%0D%0A%09public static void main(String%5B%5D args) %7B%0D%0A%09%09%0D%0A%09%09Scanner sc = new Scanner(System.in);%0D%0A%09%09int numCases = Integer.parseInt(sc.nextLine());%0D%0A%09%09for (int i = 0; i %3C numCases; i++) %7B%0D%0A%09%09%09int a = sc.nextInt();%0D%0A%09%09%09int b = sc.nextInt();%0D%0A%09%09%09System.out.println(a %25 b);%0D%0A%09%09%7D%0D%0A%09%09sc.close();%0D%0A%09%7D%0D%0A%7D

Add FindRemainder