Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write the output of the following program on the lines provided as comments (7 pts):
- public class Quiz {
- public static void main (String[] args) {
- // declare variables
- int k = 7, j = 3;
- double x = 2.5, y = -1.5;
- int m = 18 , n = 4;
- System.out.println(k * j - m); //_____________
- System.out.println(j % k); //_____________
- System.out.println((double) (k/j)); //____________
- System.out.println(5.0 / 4 ); //_________
- System.out.println(5 * x - n / 5); // ____________
- System.out.println(m / n + m % n); //____________
- System.out.println(j / (int) x); //____________
- } // method main
- } // end of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement