Jaweria
  • Jaweria
Can anyone help me here with java problem?
Applied Multimedia
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
KonradZuse
  • KonradZuse
hi, yes.
Jaweria
  • Jaweria
oh really Can you please
KonradZuse
  • KonradZuse
you should post your question if you want help.......

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

Jaweria
  • Jaweria
Yes I have two questions. First question is this: Write a for loop that prints in ascending order all the positive integers less than 200 that are divisible by both 2 and 3, separated by spaces. The answer that I got for this question is this: int i; for (i=0;i<200; i++) { if(i%2==0 i%3==0) { System.out.println [i]; } } But it says that something is wrong can you please check it for me? My second question is this: 1.05: Range Write in a Java program to read two integers and display the number of integers that lie between them, including the integers themselves. For example, there are four integers are between 3 and 6: 3, 4, 5, and 6. Input Notes: The input consists of two integers typed at the console. Output Notes (Prompts and Labels): The program's first line of output is: My answer that I got is this: Range import java.util.Scanner; class { public static void main(String args[]) { int n1,n2; Scanner in = new Scanner(System.in); System.out.println('a'); n1 = in.nextInt(); System.out.println('b'); n2 = in.nextInt(); for(int i=n1;i
KonradZuse
  • KonradZuse
if(i%2==0 i%3==0) { System.out.println [i]; } if(i%2==0 || i%3==0) { System.out.println [i]; }
KonradZuse
  • KonradZuse
What are your errors for the second one? All I see is that it should be <=n2?
Jaweria
  • Jaweria
But I dont get it what is my error for the first one?
Jaweria
  • Jaweria
what I need to fix in there?
KonradZuse
  • KonradZuse
if(i%2==0 i%3==0) if(i%2==0 || i%3==0)
KonradZuse
  • KonradZuse
|| = or && = and
Jaweria
  • Jaweria
how am I going to get that two parallel lines
KonradZuse
  • KonradZuse
shift + \ <- above enter
Jaweria
  • Jaweria
Now its giving me an error of this [i]
KonradZuse
  • KonradZuse
System.out.println [i]; System.out.println([i]);
KonradZuse
  • KonradZuse
going to bed now.
Jaweria
  • Jaweria
ok thanks though
rsmith6559
  • rsmith6559
Square brackets are used syntactically for indexes into arrays, maps, etc. They have to be used with the name of the structure: foo[ i ] System.out.println is a method of the System object. Function notation uses parentheses, so it would be: System.out.println( i );
Jaweria
  • Jaweria
i tried this but still giving me an error.
rsmith6559
  • rsmith6559
What is the error?

Looking for something else?

Not the answer you are looking for? Search for more explanations.