We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day 3: Intro to Conditional Statements
Day 3: Intro to Conditional Statements
Sort by
recency
|
1786 Discussions
|
Please Login in order to post a comment
Use an uppercase N
n=int(input("enter the no.")) if((2<=n<=5)%2==0): print(n) else: print("wrong no")
HI, friends, I got an error on this code that I want the values from 2 to 5 but I found that this statement always gave a true and display the output any friend can explain why this is happening
For Csharp:
if (N % 2 != 0) // If N is odd
} Console.WriteLine("Weird"); }}}
solved in java!
function main() { const N = parseInt(readLine().trim(), 10); let result = "Weird";
}