Switch Case

Beginner Problems Language Basics Easy Go Ad-Free - ₹20/mo

Given the integer day denoting the day number, print on the screen which day of the week it is. Week starts from Monday and for values greater than 7 or less than 1, print Invalid.

Ensure only the 1st letter of the answer is capitalised.

For printing use:-

  • for C++ : cout << variable_name;
  • for Java : System.out.print();
  • for Python : print()
  • for Javascript : console.log()

Examples:

Input: day = 3

Output: Wednesday

Input: day = 8

Output: Invalid

Input: day = 2

Constraints

  • 0 <= day <= 50

Company Tags

TCS Cognizant Accenture Infosys Capgemini Wipro IBM HCL Tech Mahindra MindTree