Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

  1. Write an if-else -if-else block that checks if a variable num is a positive number, a negative number, or zero.Print "Positive" if num is positive, "Negative" if num is negative, and "Zero" if num is zero.

  2. Write an if-else -if-else block that checks if a variable num is even or odd.If num is even, print "Even"; otherwise, print "Odd".

  3. Write an if-else-if-else block that checks if a variable age is a multiple of 5, a multiple of 3, or neither.Print "Multiple of 5" if age is a multiple of 5, "Multiple of 3" if age is a multiple of 3, and "Neither" if age is neither a multiple of 5 nor a multiple of 3.

  4. Write an if-else-if-else block that checks if a given year is in the 20th, 21st, or 22nd century.Print "20th century" for years between 1901 and 2000, "21st century" for years between 2001 and 2100, and "22nd century" for years between 2101 and 2200.let

  5. Write an if-else-if-else block that determines the value of a variable result based on the value of another variable value.If value is less than 10, set result to 0; if value is between 10 and 50(inclusive), set result to 1; if value is between 51 and 100(inclusive), set result to 2; otherwise, set result to 3.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors