Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 2
Fruit ball with java solution
Please find the error import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int fruit = sc.nextInt(); System.out.println(fruit ℅ 4) } }
1 Réponse
0
Please study the code..
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner ti=new Scanner(System.in);
int nofruit=ti.nextInt();
if(nofruit/2!=0) {
int apples=(nofruit/2);
int pie=apples/3;
System.out.println(pie);
}else System.out.println(0);
}
}
If any questions let me know ill help