Computer Science, asked by himangshudeka417, 10 months ago

Write a programe to enter a number a find out the day given a number in cpp language​ in format

Answers

Answered by vinayakdev145
1

Answer:

#include <iostream>

using namespace std;

int main()

{

   int num;

  cout << "Enter a Number From 1-7: ";

  cin >> num;

  if (num == 1){

   cout << "Monday\n";

  }

  if (num == 2){

   cout << "Tuesday\n";

  }

     if (num == 3){

   cout << "Wednesday\n";

  }

     if (num == 4){

   cout << "Thursday\n";

  }

     if (num == 5){

   cout << "Friday\n";

  }

     if (num == 6){

   cout << "Saturday\n";

  }

     if (num == 7){

   cout << "Sunday\n";

  }

  if (num >7){

   cout << "Invalid Number";

  }

   return 0;

}

Explanation:

This language is C++

Similar questions