-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput.java
More file actions
57 lines (54 loc) · 1.01 KB
/
Copy pathoutput.java
File metadata and controls
57 lines (54 loc) · 1.01 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
public class output
{
void test()
{
int m,n,q=0,p;
for(m=2;m<=3;++m)
{
for(n=1;n<=m;++n)
{
p=m+n-1;
if(p%3==0)
q+=p;
else
q+=p+4;
}
}
}
void main()
{
int x=0;
do
{
if(x<3)
{
x+=2;
System.out.print(x+"\t");
continue;
}
else
{
System.out.print(++x);
break;
}
}while(x<10);
}
int result(int m,int n)
{
if(n<=0)
return 1;
else
return(m*result(m,n-1));
}
void mymethod(int counter)
{
if(counter==0)
System.out.println(" ");
else
{
System.out.println("Hello"+counter);
mymethod(--counter);
System.out.println("Hello"+counter);
}
}
}