[Solved] Program to convert given number of days in terms of Weeks and Days [closed]


You can produce the expected output with

#include <iostream>
using namespace std;

int main()
{
    int week, day;
    cout << "Enter No. of days:";
    cin >> day;


    week = (day - 1) / 7 + 1;
    day = (day - 1) % 7 + 1;

    cout <<"\nWeeks: "<<week<<"\nDays: "<<day << endl;
}

solved Program to convert given number of days in terms of Weeks and Days [closed]