Hi,
I am facing a strange problem.
if ( c2==c1){
c3 *= 2 ;
System.out.println( c3 ) ;
.....
}
I want to insert c3*2 in the println statment. But
if ( c2==c1){
System.out.println( c3*2 ) ;
gives me a different result.
Here is the whole code:
public static void main(String [] args) {
int c1 = Integer.parseInt(args[0]) ;
int c2 = Integer.parseInt(args[1]) ;
int c3 = Integer.parseInt(args[2]) ;
/* 1 */ if ( c1 != c3 ){
/* 2 */ if (c2==c1){
/* 3 */
/* 4 */ System.out.println(c3 + c2 ) ;
/* 5 */ c3 *= c2 ;
/* 6 */ }
/* 7 */ }else{
/* 8 */ if ( c2==c1){
/* 9 */ c3 *= 2 ;
/* 10 */ System.out.println( c3 ) ;
/* 11 */ c3 *= c2 ;
/* 12 */ if ( c1 < c2 ) c2 += 7 ;
/* 13 */ else c2 += 5 ;
/* 14 */ }}
/* 15 */ System.out.println( c1+c2+c3) ;
}
.....
}
Any ideas?