[ a / cm / ic / sci / tg / v / vg / vip / y ] [ index / top / statistics / report bug ]

/sci/ - Science & Math

Searching for posts with the image hash ‘0jARg6EDlea9rjtivki5fQ==’. 1 results found.


View Post

>> No.12579364 [View]
File: 19KiB, 491x480, Capture.png [View Same] [Google] [iqdb] [SauceNAO]
12579364

import java.lang.*;
import java.io.*;
import java.util.*;
public class MyProgram
{
public static void main(String[] args)
{
int n = 100000;
int k = 0;
while (n<1000000)
{
String str0 = String.valueOf(n);
String str1 = str0.substring(0,3);
String str2 = str0.substring(3);
StringBuffer sbr = new StringBuffer(str2);
sbr.reverse();
String str3 = sbr.toString();
if (str1.equals(str3)) {
System.out.println(n);
n++;
}
else {
n++;
}
}
}

}



Navigation
View Posts [Prev] [1] [Next]
Theme [ FoolFuuka - Default / FoolFuuka - Midnight / Fuuka / Yotsubatwo - Yotsuba / Yotsubatwo - Yotsuba B ]