MCQExams
0:0:1
CBSE
JEE
NTSE
NEET
Practice
Homework
×
practice
Chapter 3 Fundamentals Of Programming - Java Quiz
Write an expression that evaluates to true if and only if the value of the integer variable x is equal to zero.
Report Question
0%
(x >= 5) ? x: -x
0%
c !=' '
0%
profits == losses
0%
x == 0
Declare a variable isACustomer suitable for representing a true or false value .
Report Question
0%
numberOfMen >= numberOfWomen
0%
boolean isACustomer
0%
(x>='0' && x<='9')
0%
(x>='a' && x<='z')
Assume that c is a char variable has been declared and already given a value . Write an expression whose value is true if and only if c is a newline character .
Report Question
0%
c == '\n'
0%
(x>='A' && x<='Z')
0%
!(x>='a' && x<='z') && !(x>='A' && x<='Z')
0%
c == ' '
Given an int variable grossPay, write an expression that evaluates to true if and only if the value of grossPay is less than 10,000.
Report Question
0%
if (temperature > 98.6) fever = true;else fever = false;
0%
if (grossPay <= 10,000)
0%
workedOvertime == true
0%
(x >= 0 && y<0)
Write an if/else statement that compares the variable age with 65, adds 1 to the variable seniorCitizens if age is greater than or equal to 65, and adds 1 to the variable nonSeniors otherwise.
Report Question
0%
if (age >= 65) seniorCitizens += 1; else nonSeniors += 1;
0%
if ( temperature > 98.6 ) fever = true ;
0%
if (workedOvertime == true) pay = pay * 1.5;
0%
if(age < 18){ minors = minors + 1;}else if(age > 17 && age < 65){ adults = adults + 1;}else{ seniors = seniors + 1;}
3-5) (Find future dates) Write a program that prompts the user to enter an integer for today's day of the week (Sunday is 0, Monday is 1, ..., and Saturday is 6). Also prompt the user to enter the number of days after today for a future day and dis- play the future day of the week.
Report Question
0%
import java.util.Scanner; public class FindFutureDates{ public static void main(String[]args) {Scanner input = new Scanner(System.in);System.out.print("Enter today's day:");int today = input.nextInt();System.out.print("Enter the number of days elapsed since today:");int elapsedDays = input.nextInt();int futureDay = (today + elapsedDays)%7;System.out.print("Today is ");switch(today) { case 0: System.out.print("Sunday"); break; case 1: System.out.print("Monday"); break; case 2: System.out.print("Tueday"); break; case 3: System.out.print("Wednesay"); break; case 4: System.out.print("Thursday"); break; case 5: System.out.print("Friday"); break; case 6: System.out.print("Saturday"); break; default: System.out.print(" an invalid starting day. Today's day must be 0-6."); } System.out.print(" and the future day is "); switch(futureDay) { case 0: System.out.println("Sunday"); break; case 1: System.out.println("Monday"); break; case 2: System.out.println("Tuesday"); break; case 3: System.out.println("Wednesay"); break; case 4: System.out.println("Thursday"); break; case 5: System.out.println("Friday"); break; case 6: System.out.println("Saturday"); break; default: System.out.println("Unknown day"); } }}
0%
if (soldYesterday > soldToday) salesTrend = -1; else salesTrend = 1;
0%
callsReceived = stdin.nextInt(); operatorsOnCall = stdin.nextInt(); if (operatorsOnCall == 0) System.out.println("INVALID"); else System.out.println(callsReceived/operatorsOnCall);
0%
!isEmpty && numberOfCredits > 2
Write an expression that evaluates to true if and only if value of the boolean variable isAMember is false .
Report Question
0%
isAMember == false
0%
workedOvertime == true
0%
index > lastIndex
0%
profits == losses
Assume that a boolean variable workedOvertime has been declared , and that another variable , hoursWorked has been declared and initialized . Write a statement that assigns the value true to workedOvertime if hoursWorked is greater than 40 and false otherwise.
Report Question
0%
(x>='A' && x<='Z')
0%
if (numberOfSides == 4)isQuadrilateral = true;elseisQuadrilateral = false;
0%
(x>=48 && x<=55)
0%
workedOvertime= hoursWorked > 40;
Clunker Motors Inc. is recalling all vehicles from model years 2001-Given a variable modelYear write a statement that prints the message "RECALL" to standard output if the value of modelYear falls within that range.
Report Question
0%
if (modelYear > 2006 || modelYear < 2001) System.out.println("NO RECALL");
0%
norecall=!((modelYear>=1995 && modelYear <=1998) || (modelYear>=2004 && modelYear<=2006));
0%
if (modelYear >= 2001 && modelYear <= 2006) System.out.println("RECALL");
0%
if ((modelYear >= 1995 && modelYear <= 1998) || (modelYear >=2004 && modelYear<=2006))System.out.println("RECALL");
Write an expression that evaluates to true if the integer variable x contains an even value , and false if it contains an odd value .
Report Question
0%
(x >= 0 && y<0)
0%
profits == losses
0%
x>y
0%
x % 2 == 0
Write an if/else statement that adds 1 to the variable minors if the variable age is less than 18, adds 1 to the variable adults if age is 18 through 64 and adds 1 to the variable seniors if age is 65 or older.
Report Question
0%
if(gpa > 3.5){ deansList = deansList + 1; System.out.println(studentName);}
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
0%
if (age >= 65) seniorCitizens += 1; else nonSeniors += 1;
0%
if(age < 18){ minors = minors + 1;}else if(age > 17 && age < 65){ adults = adults + 1;}else{ seniors = seniors + 1;}
Clunker Motors Inc. is recalling all vehicles from model years 2001-Given a variable modelYear write a statement that prints the message "NO RECALL" to standard output if the value of modelYear DOES NOT fall within that range.
Report Question
0%
if (modelYear > 2006 || modelYear < 2001) System.out.println("NO RECALL");
0%
if (modelYear >= 2001 && modelYear <= 2006) System.out.println("RECALL");
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
norecall=!(modelYear >= 2001 && modelYear <= 2006);
Write an expression that evaluates to true if the value of the integer variable numberOfPrizes is divisible (with no remainder) by the integer variable numberOfParticipants. Assume that numberOfParticipants is not zero.
Report Question
0%
workedOvertime == true
0%
if (soldYesterday > soldToday) salesTrend = -1; else salesTrend = 1;
0%
numberOfPrizes % numberOfParticipants == 0
0%
numberOfMen >= numberOfWomen
Write an expression that evaluates to true if the value x is greater than or equal to y.
Report Question
0%
x>y
0%
x >= y
0%
x == 0
0%
index > lastIndex
Given the char variable c, write an expression that is true if and only if the value of c is not the space character .
Report Question
0%
c !=' '
0%
c == '\n'
0%
x % 2 == 0
0%
(x >= 0 && y<0)
Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is NOT a letter.
Report Question
0%
!(x>='a' && x<='z') && !(x>='A' && x<='Z')
0%
(x>='A' && x<='Z')
0%
(x>='0' && x<='9')
0%
c == '\t'
Given two variables , isEmpty of type boolean , indicating whether a class roster is empty or not, and numberOfCredits of type int , containing the number of credits for a class , write an expression that evaluates to true if the class roster is empty or the class is exactly three credits.
Report Question
0%
isEmpty || numberOfCredits == 3
0%
temperature>90 && humidity<10 == true
0%
!isEmpty && numberOfCredits > 2
0%
!(c == ' ' || c== '\n' || c == '\t')
Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do).HOWEVER: if any value read in is not valid input, just print the message "INVALID".ASSUME the availability of a variable , stdin, that references a Scanner object associated with standard input.
Report Question
0%
freeBooks = 0;if (isPremiumCustomer == true){ if (nbooksPurchased >= 5) freeBooks = 1; if (nbooksPurchased >= 8) freeBooks = 2;}else if (isPremiumCustomer == false){ if (nbooksPurchased >= 7) freeBooks = 1; if (nbooksPurchased >= 12) freeBooks = 2;}
0%
if (grossPay <= 10,000)
0%
callsReceived = stdin.nextInt(); operatorsOnCall = stdin.nextInt(); if (operatorsOnCall == 0) System.out.println("INVALID"); else System.out.println(callsReceived/operatorsOnCall);
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
Assume that c is a char variable has been declared and already given a value . Write an expression whose value is true if and only if c is a tab character .
Report Question
0%
(x>='0' && x<='9')
0%
c == '\t'
0%
(x>=48 && x<=55)
0%
(x>='A' && x<='Z')
Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the message "player1 wins" is printed to standard out. When score2 exceeds score1, the message "player2 wins" is printed to standard out. In each case, the variables player1Wins,, player1Losses, player2Wins, and player2Losses,, are incremented when appropriate.Finally, in the event of a tie, the message "tie" is printed and the variable tieCount is incremented .
Report Question
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
0%
if ((modelYear >= 1995 && modelYear <= 1998) || (modelYear >=2004 && modelYear<=2006))System.out.println("RECALL");
0%
if (score1 > score2){ System.out.print("player1 wins"); player1Wins += 1; player2Losses += 1;}else if (score2 > score1){ System.out.print("player2 wins"); player1Losses += 1; player2Wins += 1;}else { System.out.print("tie"); tieCount += 1;}
0%
if (pH < 7){ neutral = 0; base = 0; acid = 1;}else if (pH > 7){ neutral = 0; base = 1; acid = 0;}else { neutral = 1; base = 0; acid = 0;}
Write an expression using the conditional operator (? :) that compares the value of the variable x to 5 and results in: x if x is greater than or equal to 5 -x if x is less than 5
Report Question
0%
isAMember == false
0%
(x >= 5) ? x: -x
0%
profits == losses
0%
x == 0
Working overtime is defined as having worked more than 40 hours during the week. Given the variable hoursWorked, write an expression that evaluates to true if the employee worked overtime.
Report Question
0%
(x >= 5) ? x: -x
0%
onOffSwitch = !onOffSwitch;
0%
hoursWorked > 40
0%
(x>=48 && x<=55)
Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is an octal (Base 8) digit (0-7).
Report Question
0%
(x>='A' && x<='Z')
0%
(x >= 0 && y<0)
0%
(x>=48 && x<=55)
0%
(x>='0' && x<='9')
Assume that a boolean variable isQuadrilateral has been declared , and that another variable , numberOfSides has been declared and initialized . Write a statement that assigns the value true if numberOfSides is exactly 4 and false otherwise.
Report Question
0%
if(gpa > 3.5){ deansList = deansList + 1; System.out.println(studentName);}
0%
if (modelYear > 2006 || modelYear < 2001) System.out.println("NO RECALL");
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
if (numberOfSides == 4)isQuadrilateral = true;elseisQuadrilateral = false;
Assume that the variables gpa, deansList and studentName, have been declared and initialized . Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.
Report Question
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
!(x>='a' && x<='z') && !(x>='A' && x<='Z')
0%
if(gpa > 3.5){ deansList = deansList + 1; System.out.println(studentName);}
0%
if (age >= 65) seniorCitizens += 1; else nonSeniors += 1;
Assume that credits is an int variable whose value is 0 or positive. Write an expression whose value is "freshman" or "sophomore" or "junior" or "senior" based on the value of credits. In particular: if the value of credits is less than 30 the expression 's value is "freshman"; 30-59 would be a "sophomore", 60-89 would be "junior" and 90 or more would be a "senior".
Report Question
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
(credits < 30) ? "freshman" : (credits >= 30 && credits < 60) ?"sophomore" : (credits >= 60 && credits < 90) ? "junior" : "senior"
0%
!(c == ' ' || c== '\n' || c == '\t')
0%
if (numberOfSides == 4)isQuadrilateral = true;elseisQuadrilateral = false;
Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with every purchase of 8 or more books. It offers regular customers 1 free book with every purchase of 7 or more books, and offers 2 free books with every purchase of 12 or more books.Write a statement that assigns freeBooks the appropriate value based on the values of the boolean variable isPremiumCustomer and the int variable nbooksPurchased.
Report Question
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
0%
freeBooks = 0;if (isPremiumCustomer == true){ if (nbooksPurchased >= 5) freeBooks = 1; if (nbooksPurchased >= 8) freeBooks = 2;}else if (isPremiumCustomer == false){ if (nbooksPurchased >= 7) freeBooks = 1; if (nbooksPurchased >= 12) freeBooks = 2;}
0%
(credits < 30) ? "freshman" : (credits >= 30 && credits < 60) ?"sophomore" : (credits >= 60 && credits < 90) ? "junior" : "senior"
0%
(month==1)?"jan":(month==2)?"feb": (month==3)?"mar": (month==4)?"apr": (month==5)?"may":(month==6)?"jun": (month==7)?"jul":(month==8)?"aug":(month==9)?"sep": (month==10)?"oct": (month==11)?"nov": (month==12)?"dec":null
Write a conditional that assigns 10,000 to the variable bonus if the value of the variable goodsSold is greater than 500,000.
Report Question
0%
if (temperature > 98.6) fever = true;else fever = false;
0%
if (goodsSold > 500000)bonus = 10000;
0%
if (age >= 65) seniorCitizens += 1; else nonSeniors += 1;
0%
if (grossPay <= 10,000)
NOTE: in mathematics, division by zero is undefined. So, in Java, division by zero is always an error.Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do).HOWEVER: if any value read in is not valid input, just print the message "INVALID".ASSUME the availability of a variable , stdin, that references a Scanner object associated with standard input.
Report Question
0%
callsReceived = stdin.nextInt(); operatorsOnCall = stdin.nextInt(); if (operatorsOnCall == 0) System.out.println("INVALID"); else System.out.println(callsReceived/operatorsOnCall);
0%
freeBooks = 0;if (isPremiumCustomer == true){ if (nbooksPurchased >= 5) freeBooks = 1; if (nbooksPurchased >= 8) freeBooks = 2;}else if (isPremiumCustomer == false){ if (nbooksPurchased >= 7) freeBooks = 1; if (nbooksPurchased >= 12) freeBooks = 2;}
0%
if (score1 > score2){ System.out.print("player1 wins"); player1Wins += 1; player2Losses += 1;}else if (score2 > score1){ System.out.print("player2 wins"); player1Losses += 1; player2Wins += 1;}else { System.out.print("tie"); tieCount += 1;}
0%
if (pH < 7){ neutral = 0; base = 0; acid = 1;}else if (pH > 7){ neutral = 0; base = 1; acid = 0;}else { neutral = 1; base = 0; acid = 0;}
Four int variables , x1, x2, y1, and y2, have been declared and been given values . Write an expression whose value is the difference between the larger of x1 and x2 and the smaller of y1 and y2.
Report Question
0%
!isEmpty && numberOfCredits > 2
0%
(x < y ? y : x)
0%
(x >= 5) ? x: -x
0%
(x1 < x2 ? x2 : x1) - (y1 < y2 ? y1 : y2)
Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-A boolean variable named recalled has been declared . Given a variable modelYear write a statement that assigns true to norecall if the value of modelYear does NOT fall within the two recall ranges and assigns false otherwise.Do not use an if statement in this exercise!
Report Question
0%
recalled = (modelYear >= 1995 && modelYear <= 1998) || (modelYear >= 2004 && modelYear <= 2006);
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
norecall=!(modelYear >= 2001 && modelYear <= 2006);
0%
norecall=!((modelYear>=1995 && modelYear <=1998) || (modelYear>=2004 && modelYear<=2006));
Assume that x is a char variable has been declared and already given a value . Write an expression whose value is true if and only if x is a decimal digit (0-9).
Report Question
0%
(x>='0' && x<='9')
0%
!(x>='a' && x<='z') && !(x>='A' && x<='Z')
0%
(x>='A' && x<='Z')
0%
c == '\t'
Assume that isIsosceles is a boolean variable , and that the variables isoCount,triangleCount, and polygonCount have all been declared and initialized . Write a statement that adds 1 to each of these count variables (isoCount,triangleCount, andpolygonCount) if isIsosceles is true .
Report Question
0%
(credits < 30) ? "freshman" : (credits >= 30 && credits < 60) ?"sophomore" : (credits >= 60 && credits < 90) ? "junior" : "senior"
0%
if (isIsosceles == true) { isoCount += 1; triangleCount += 1; polygonCount += 1; }
0%
if ((modelYear >= 1995 && modelYear <= 1998) || (modelYear >=2004 && modelYear<=2006))System.out.println("RECALL");
0%
if (numberOfSides == 4)isQuadrilateral = true;elseisQuadrilateral = false;
Clunker Motors Inc. is recalling all vehicles from model years 2001-A boolean variable named norecall has been declared . Given a variable modelYear write a statement that assigns true to norecall if the value of modelYear does NOT within the recall range and assigns false otherwise.Do not use an if statement in this exercise!
Report Question
0%
recalled = (modelYear >= 1995 && modelYear <= 1998) || (modelYear >= 2004 && modelYear <= 2006);
0%
workedOvertime= hoursWorked > 40;
0%
norecall=!(modelYear >= 2001 && modelYear <= 2006);
0%
if ((modelYear >= 1995 && modelYear <= 1998) || (modelYear >=2004 && modelYear<=2006))System.out.println("RECALL");
Given the variables numberOfMen and numberOfWomen, write an expression that evaluates to true if the number of men is greater than or equal to the number of women.
Report Question
0%
numberOfMen >= numberOfWomen
0%
isEmpty || numberOfCredits == 3
0%
temperature>90 && humidity<10 == true
0%
!isEmpty && numberOfCredits > 2
Write an if/else statement that compares the double variable pH with 7.0 and makes the following assignments to the int variables neutral, base, and acid: 0,0,1 if pH is less than 7 0,1,0 if pH is greater than 7 1,0,0 if pH is equal to 7
Report Question
0%
if (age >= 65) seniorCitizens += 1; else nonSeniors += 1;
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
0%
if (pH < 7){ neutral = 0; base = 0; acid = 1;}else if (pH > 7){ neutral = 0; base = 1; acid = 0;}else { neutral = 1; base = 0; acid = 0;}
0%
if (soldYesterday > soldToday) salesTrend = -1; else salesTrend = 1;
Write an expression that evaluates to true if the value of index is greater than the value of lastIndex.
Report Question
0%
index > lastIndex
0%
x % 2 == 0
0%
x >= y
0%
profits == losses
Given two variables , isEmpty of type boolean , indicating whether a class roster is empty or not, and numberOfCredits of type int , containing the number of credits for a class , write an expression that evaluates to true if the class roster is not empty and the class is more than two credits.
Report Question
0%
!isEmpty && (numberOfCredits == 1 || numberOfCredits == 3)
0%
isEmpty || numberOfCredits == 3
0%
!isEmpty && numberOfCredits > 2
0%
numberOfMen >= numberOfWomen
Write an expression that evaluates to true if and only if the variables profits and losses are exactly equal .
Report Question
0%
index > lastIndex
0%
(x >= 5) ? x: -x
0%
profits == losses
0%
x % 2 == 0
Write a statement that adds 1 to the variable reverseDrivers if the variable speed is less than 0,adds 1 to the variable parkedDrivers if the variable speed is less than 1,adds 1 to the variable slowDrivers if the variable speed is less than 40,adds 1 to the variable safeDrivers if the variable speed is less than or equal to 65, and otherwise adds 1 to the variable speeders.
Report Question
0%
if (pH < 7){ neutral = 0; base = 0; acid = 1;}else if (pH > 7){ neutral = 0; base = 1; acid = 0;}else { neutral = 1; base = 0; acid = 0;}
0%
if (score1 > score2){ System.out.print("player1 wins"); player1Wins += 1; player2Losses += 1;}else if (score2 > score1){ System.out.print("player2 wins"); player1Losses += 1; player2Wins += 1;}else { System.out.print("tie"); tieCount += 1;}
0%
if(age < 18){ minors = minors + 1;}else if(age > 17 && age < 65){ adults = adults + 1;}else{ seniors = seniors + 1;}
0%
if (speed < 0) reverseDrivers += 1; else if (speed < 1) parkedDrivers += 1;else if (speed < 40) slowDrivers += 1;else if (speed <= 65) safeDrivers += 1; else speeders += 1;
Assume that c is a char variable has been declared and already given a value . Write an expression whose value is true if and only if c is a space character .
Report Question
0%
c !=' '
0%
c == '\t'
0%
c == '\n'
0%
c == ' '
Write a conditional that decreases the variable shelfLife by 4 if the variable outsideTemperature is greater than 90.
Report Question
0%
if (temperature > 98.6) fever = true;else fever = false;
0%
if(age < 18){ minors = minors + 1;}else if(age > 17 && age < 65){ adults = adults + 1;}else{ seniors = seniors + 1;}
0%
if(outsideTemperature > 90) shelfLife = shelfLife - 4;
0%
numberOfPrizes % numberOfParticipants == 0
Write an expression using the conditional operator (? :) that compares the values of the variables x and y. The result (that is the value ) of this expression should be the value of the larger of the two variables .
Report Question
0%
(x < y ? y : x)
0%
(x >= 5) ? x: -x
0%
index > lastIndex
0%
widthOfBox % widthOfBook !=0
Assume that c is a char variable has been declared and already given a value . Write an expression whose value is true if and only if c is NOT what is called a whitespace character (that is a space or a tab or a newline-- none of which result in ink being printed on paper).
Report Question
0%
(x>='a' && x<='z')
0%
!(c == ' ' || c== '\n' || c == '\t')
0%
c == ' '
0%
workedOvertime= hoursWorked > 40;
Write an expression that evaluates to true if and only if the value of the boolean variable workedOvertime is true .
Report Question
0%
workedOvertime == true
0%
isAMember == false
0%
numberOfPrizes % numberOfParticipants == 0
0%
widthOfBox % widthOfBook !=0
Clunker Motors Inc. is recalling all vehicles from model years 2001-A boolean variable named recalled has been declared . Given a variable modelYear write a statement that assigns true to recalled if the value of modelYear falls within the recall range and assigns false otherwise.Do not use an if statement in this exercise!
Report Question
0%
recalled=(modelYear>=2001 && modelYear<=2006);
0%
!(c == ' ' || c== '\n' || c == '\t')
0%
workedOvertime= hoursWorked > 40;
0%
if ((modelYear >= 1995 && modelYear <= 1998) || (modelYear >=2004 && modelYear<=2006))System.out.println("RECALL");
Write an expression that evaluates to true if and only if the integer x is greater than the integer y.
Report Question
0%
(x >= 5) ? x: -x
0%
x>y
0%
widthOfBox % widthOfBook !=0
0%
index > lastIndex
Given that the variables x and y have already been declared and assigned values , write an expression that evaluates to true if x is non-negative and y is negative.
Report Question
0%
x % 2 == 0
0%
(x >= 0 && y<0)
0%
(x>='a' && x<='z')
0%
(x>=0 || y<0)
0:0:1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
0
Answered
0
Not Answered
0
Not Visited
Correct : 0
Incorrect : 0
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqexams.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page