Page 102 - 2617_JSSPS_C-6
P. 102
4. What are logical operators? Write the names of any two logical operators.
5. What is the use of unary operators? How many unary operators are there in Java?
Scratch Your Brain. 21 st Century #Critical Thinking
Skills
1. public class rad{
Write output here:
public static void main(String[] args){
double r, c;
r=2.3;
c = 2 * 3.14 * r;
System.out.println(c);
}
}
2. public class A{ Write output here:
public static void main(String[] args)
{
double s, GST, inv;
s = 200;
GST = 5 * s/100;
inv = s + GST;
System.out.println("GST to be paid:" + GST);
System.out.println("Total invoice value:" + inv);
}
}
3. public class program{
public static void main(String[] args){
Write output here:
int a, b, c;
a = 10;
b = 20;
c = a;
a = b;
b = c;
System.out.println("Value of a is:" + a);
System.out.println("Value of b is:" + b);
}
}
100 Premium Edition-VI

