Can someone provide me some java output questions for practice, which includes +, -, *, /, ++, -- and brackets? Please also attach answers at the end
Answers
Answered by
0
class ABC
{
public static void main()
{
int a,b,c,d;
a=b+c;
b= c*d;
c=(a/b)/d;
System.out.println(" value of a is"+a);
System.out.println("value of b is"+b);
System.out.println("value of c is"+c);
}
}
Consider a=10, b=20, c=15, d=25.
Perform the calculation and write output as per BlueJ version output window.
{
public static void main()
{
int a,b,c,d;
a=b+c;
b= c*d;
c=(a/b)/d;
System.out.println(" value of a is"+a);
System.out.println("value of b is"+b);
System.out.println("value of c is"+c);
}
}
Consider a=10, b=20, c=15, d=25.
Perform the calculation and write output as per BlueJ version output window.
Similar questions
Social Sciences,
7 months ago
Hindi,
7 months ago
Math,
1 year ago
Science,
1 year ago
History,
1 year ago