+ 1

What's false ? I'm sorry if it's really easy to find but I've been doin this for 1 hour and ain't being good >.<

public class Program { public static void main(String[ ] args); String num1 = 60; String num2 = 20; num1 % num2; String num3 = num1 + num2; System.println(num1); Thanks for any help(☆^ー^☆)

13th Jun 2019, 6:10 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
18 Answers
+ 2
Yup, that worked. Thanks alot !
13th Jun 2019, 6:45 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
---> num1 % num2; do you mean: num1 = num2;
13th Jun 2019, 6:13 PM
Cat Sauce
Cat Sauce - avatar
+ 1
what do you want this code to do?
13th Jun 2019, 6:13 PM
Cat Sauce
Cat Sauce - avatar
+ 1
Olin Guerrero I mean num1 ÷ num2 Oh and could I use both, String and int for this one ?
13th Jun 2019, 6:14 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
First, declare your numbers as int, not String. Second, the "num1 % num2;" line does nothing. The comper just goes "yup, that's an equation" and does nothing with the result. Try num1 = num1 % num2; or something similar.
13th Jun 2019, 6:14 PM
Jackson O’Donnell
+ 1
KAMPFTEDDY McFlausch if you want to devide use "/" so: num1 = num1 / num2;
13th Jun 2019, 6:16 PM
Cat Sauce
Cat Sauce - avatar
+ 1
Jackson O’Donnell, oh, alright. I wanna divide 60 by 20, means num1 divided by num2
13th Jun 2019, 6:16 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
Oooooh, okay. Got it lol. Thanks for ur help guys^^
13th Jun 2019, 6:17 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
public class Program { public static void main(String[ ] args); int num1 = 60; int num2 = 20; num1 = num1 / num2; int num3 = num1 + num2; System.println(num1);
13th Jun 2019, 6:17 PM
Cat Sauce
Cat Sauce - avatar
+ 1
Nope, still wrong 4 errors. 3 times " <identifier> expected " And 1 time " Reached end of file while parsing "
13th Jun 2019, 6:22 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
public class Program { public static void main(String[ ] args){ int num1 = 60; int num2 = 20; num1 = num1 / num2; int num3 = num1 + num2; System.println(num1);}};
13th Jun 2019, 6:28 PM
Jackson O’Donnell
+ 1
Lol still " Reached end of file while parsing "
13th Jun 2019, 6:30 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
And " can't find symbol " " System.out.printIn(num1) ;}};
13th Jun 2019, 6:33 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
KAMPFTEDDY McFlausch oh i forgot, its System.out.println(num1);
13th Jun 2019, 6:42 PM
Cat Sauce
Cat Sauce - avatar
+ 1
Sry to disappoint ya but I already tried that :/
13th Jun 2019, 6:43 PM
KAMPFTEDDY McFlausch
KAMPFTEDDY McFlausch - avatar
+ 1
public class Program { public static void main(String[ ] args){ int num1 = 60; int num2 = 20; num1 = num1 / num2; int num3 = num1 + num2; System.out.println(num1); } };
13th Jun 2019, 6:43 PM
Cat Sauce
Cat Sauce - avatar
13th Jun 2019, 6:46 PM
Cat Sauce
Cat Sauce - avatar
+ 1
Hey, why you don't just try like this: public class Program { public static void main(String[ ] args){ int num1 = 60; int num2 = 20; System.out.println(num1 / num2); } };
13th Jun 2019, 11:22 PM
Dejan Francuz🥇
Dejan Francuz🥇 - avatar