yvN Posted October 8, 2020 Share Posted October 8, 2020 import java.util.Scanner; public class bijele { public static void main (String[] args) { Scanner in = new Scanner(System.in); int[] neededPieces = {1,1,2,2,2,8}; String[] currentPieces = in.nextLine().split(" "); for (int i = 0; i < 6; i++) { neededPieces[i] -= Integer.parseInt(currentPieces[i]); System.out.print("" + neededPieces[i] + " "); } } } Link to comment https://forums.phpfreaks.com/topic/311582-convert-java-to-php-please-help-me-urgently/ Share on other sites More sharing options...
Barand Posted October 8, 2020 Share Posted October 8, 2020 How many topics do you intend creating for this problem? (there is already one too many). Link to comment https://forums.phpfreaks.com/topic/311582-convert-java-to-php-please-help-me-urgently/#findComment-1581781 Share on other sites More sharing options...
yvN Posted October 8, 2020 Author Share Posted October 8, 2020 it was bad, is that in the other topic I had not yet resolved in .java I will delete it. Link to comment https://forums.phpfreaks.com/topic/311582-convert-java-to-php-please-help-me-urgently/#findComment-1581782 Share on other sites More sharing options...
Recommended Posts