#include <iostream>

using namespace std;

int main()
{
    unsigned short int tryAgain;
    double sum = 0;
    unsigned long int userInput;
    do
    {
        do
        {
            cout << "Enter the number: ";
            cin >> userInput;
        }while(userInput < 1);
        for(int i = 1; i < userInput; i++)
        {
            if(i%3 == 0)
            {
                sum += i;
                cout << i << " is multiple of 3. It's now added to variable sum which is now " << sum << endl;
            };
            if(i%5 == 0)
            {
                sum += i;
                cout << i << " is multiple of 5. It's now added to variable sum which is now " << sum << endl;
            };
        };
        cout << "The sum of its multiple is: " << sum << endl;
        do
        {
            cout << "Wanna try again?" << endl;
            cout << "1 - Yes" << endl << "2 - No" << endl;
            cin >> tryAgain;
        }while(tryAgain != 1 && tryAgain != 2);
        if(tryAgain == 1) sum = 0;
    }while(tryAgain == 1);
};