+ 1

':' expected how do i fix this please.

15th Sep 2022, 8:01 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
13 Antworten
+ 2
Every statement in java end with ; So add num = num/2 ; 👈 And return binary ; 👈
15th Sep 2022, 8:14 AM
Jayakrishna 🇮🇳
+ 1
Is this about "loan amount calculations? " Formulae is incorrect.. amount = amount - amount*10/100; // for 10%, if you need 90% , take 90 better to take new question....
15th Sep 2022, 1:52 PM
Jayakrishna 🇮🇳
0
Can you shown code? Otherwise, add : as compiler expecting... 🙂
15th Sep 2022, 8:09 AM
Jayakrishna 🇮🇳
0
import java.util.Scanner; //your code goes here public class Converter{ public static String toBinary(int num){ String binary=""; while(num>0){ binary=(num%2)+binary; num=num/2 } return binary } } public class Program { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); System.out.print(Converter.toBinary(x)); } }
15th Sep 2022, 8:10 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
0
Here sir
15th Sep 2022, 8:10 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
0
Thank you
15th Sep 2022, 8:26 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here for(int i=0; i<3 i++){ amount=(int)(amount * 90/100) } System.out.println(amount); }
15th Sep 2022, 8:27 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
0
Thanks everyone
15th Sep 2022, 10:54 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
0
How past code
16th Sep 2022, 3:27 PM
yaswanthreddy
0
How about this
16th Sep 2022, 4:53 PM
Deepak Saini
Deepak Saini - avatar
0
Write a phyton program that declare 2 variables (num1 and num2 ) with values 105 and 35 respectively
17th Sep 2022, 6:12 AM
Amber
- 1
Sir
15th Sep 2022, 8:26 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar
- 1
How about this?
15th Sep 2022, 8:26 AM
Mark Angelo Alarcon
Mark Angelo Alarcon - avatar