Fred_45559
asked on
Print all five-digit Palindrome numbers
I just wrote this program: Can someone give me some input on how to make the numbers print side by side?
Example 10001, 10010,............
Here is the program I wrote?
class Week6prob1dem
{
public static void main(String[] args)
{
for (int i = 100; i<=999; i++)
System.out.println((i/100) +""+((i/10 )%10)+""+( i%10)+""+( (i/10)%10) +""+(i/100 ));
}
}
Example 10001, 10010,............
Here is the program I wrote?
class Week6prob1dem
{
public static void main(String[] args)
{
for (int i = 100; i<=999; i++)
System.out.println((i/100)
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ooppss sorry the solution had already been posted
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if you want to comment the particular line u want to use // instead of >>
ASKER
I tried this code;
class Tester49
{
public static void main(String[] args)
{
for (int i = 100; i<=999; i++)
>>System.out.println((i/10
System.out.print((i/100)+"
}
}
compiled: __________________________
illegal start of expression on line 6
I tried putting quotation marksi in the brackets. I've research it and have not found anything. I tried print() first then println. and it still did not work?