Computer Science, asked by tiyasha142005, 8 months ago

What will be the output of the following code ?
int m=2
int n =15
for (int I =1 ; i<5 ; i++)
m++;
--n;​

Answers

Answered by jeevan29jamy
2

Explanation:

/**

*

*/

public class peck

{

/**

*

*/

static public void main(String[] args)

{

int m=2;

int n=15;

for(int i=1;i<5;i++)

m++;--n;

System.out.println("m= "+m);

System.out.println("n= "+n);

}

}

out put

is m= 6 n= 14

Similar questions