Code translate help me please | Sololearn: Learn to code for FREE!

+8

Code translate help me please

Write a program that displays the quotient and the remainder of the entire division of two integers entered by keyboard. #include<stdio.h> main() { int A, B; printf("Introduisez deux nombres entiers : "); scanf("%i %i", &A, &B); printf("Division entiere : %in", A/B); printf("Reste : %in", A%B); printf("Quotient rationnel : %fn", (float)A/B); /* c'est pas la peine d'utiliser une autre variable*/ return 0; } I need help for the same action but in Java

3 Answers

New Answer

+3

class test{ public static void main(String[]Args){ int A, B; Scanner sc=new Scanner(System.in); System.out.println("Enter numbers : "); A=sc.nextInt(); B=sc.nextInt(); System.out.println("Whole Division:"+ A/B); System.out.println("Rest :"+ A%B); System.out.println("Rational Quotient : "+ (float)A/B); /* It is not worth using another variable*/ } }

+9

+1