-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP4.java
More file actions
38 lines (37 loc) · 916 Bytes
/
P4.java
File metadata and controls
38 lines (37 loc) · 916 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
class P4
{
public static void main(String[] args)
{
int a=100,b=100;
int c,d,r,m,h;
c=d=r=m=h=0;
for(a=100;a<1000;a++)
{
for(b=100;b<1000;b++)
{
c=a*b;
d=c;
//System.out.println(c);
while(c!=0)
{
r= c % 10;
m=m * 10 + r;
c=c / 10;
//System.out.println(m);
//}
System.out.println(m);
}
if(m == d)
{
h=d;
System.out.println(h);
// System.out.println(d);
// System.out.println(m);
}
//b++;
}
//a++;
}
// System.out.println(h);
}
}