Computer Science, asked by chakravertyrimi13, 7 months ago

write to accept a month number and print the corresponding month name. Make use of switch case and print suitable messages
please help me with this if you answer correctly I'll definitely mark you as the brainliest​.

Answers

Answered by faizanurrahman838
0

Answer:

I am writing code in C++, appropriately convert it as per your need. Let's start.

Explanation:

#include<iostream>

int main()

{

int monthNumber{};

std::cin >> monthNumber;

switch(monthNumber)

{

case 1:

std::cout << "January";

break;

// write remaining case as above

}

}

step 1: take integer input from user

step 2: apply switch on input and write all cases with appropriate value and print statement

step 3: done, don't forget the break statement after each case,

extra step, if you want to run your program multiple time the use while loop on whole program...if you can..

thats it, hope you find it useful.

if you need more explanation then rate it to 1 star.

Similar questions
Math, 11 months ago