id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amjadm@miamioh.edu assignment3part1 > negate
prev  |  next  |  chance

Given a boolean parameter value, negate its value num times. For instance: if the value of value parameter is true and the value of num parameter is 3, the result would be false as the process of negation needs to happen 3 times: true->false(1)->true(2)->false(3) if the value of num is negative, return the value instead.


negate(false, 0) → false
negate(false, 1) → true
negate(true, 1) → false

...Save, Compile, Run (ctrl-enter)

public boolean negate(boolean value, int num) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy