write a program to print the triple of number N if it is a multiple of 3 otherwise, double of N
#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    if (n % 3 == 0)
    {
        cout << n * 3;
    }
    else
    {
        cout << n * 2;
    }
}
Comments