write a bluej program if a=4,b=8,c=++a+2a+b
Answers
Answered by
1
public class main{
public static void main(String[] str)
{
int a, b, c;
a = 4;
b = 8;
c = a+2*a+b;
System.out.println("Result is: " + c);
}
}
There is a fault in your question. ++ is not recognized as an operator.
Result:
Result is: 20
Similar questions