import java.util.*; public class rough12 { public static void main(String[] args) { int arr1[]= {9,9,9,9,9,9,9,9,9,9}; int arr2[]= {9,9,8,5,4,0,9,7,3,1}; int arr3[]=new int [10]; int i,k=10; long j=0; for(i=0;i<arr1.length;i++) { arr3[i]=arr1[i]-arr2[i]; j=(j*10)+arr3[i]; } System.out.printf("%010d%n",j); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter