Sure! Hold on...
package variables;
public class SimpleCalc {
public static void main(String[] args){
int n=11;
if (n<0){
if (n%2); ...
Type: Posts; User: IneedHelpwithJava
Sure! Hold on...
package variables;
public class SimpleCalc {
public static void main(String[] args){
int n=11;
if (n<0){
if (n%2); ...
Thank you I will try this and come back
--- Update ---
That was helpful (i now understand the modulus operator) but I am getting problems in my code where it is not converting to boolean. See...
I was wondering how I could go about printing a number both negative and odd using "if" statements and (I'm assuming but not entirely sure) boolean?
I am really new to java and wanted to know how I can print an int which is both negative and odd and if so, needs to be put into the formula (n^2+1) . I am not looking particularly for answers...