Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- const int daysInWeek{ 7 };
- int days{ 0 };
- int weeks{ 0 };
- std::cout << "Enter days to convert:\n";
- std::cin >> days;
- weeks = days / daysInWeek;
- days %= daysInWeek;
- std::cout << weeks << " full weeks and " << days << " days\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement