algorithms/implementation/strange-advertising.c
int viralAdvertising(int n) {
    int shared = 5;
    int total = 0;
    for (int i = 0; i < n; i++)
    {
        int liked = shared / 2;
        total += liked;
        shared = liked * 3;
    }
    return total;
}
// Complete the viralAdvertising function below.
Complete the viralAdvertising function below.
Complete the viralAdvertising function below .
int viralAdvertising(int n) {
    int shared = 5;
    int total = 0;
    for (int i = 0; i < n; i++)
    {
        int liked = shared / 2;
        total += liked;
        shared = liked * 3;
    }
    return total;
}
int viralAdvertising ( int n ) { int shared = 5 ; int total = 0 ; for ( int i = 0 ; i < n ; i ++ ) { int liked = shared / 2 ; total += liked ; shared = liked * 3 ; } return total ; }
Complete the viralAdvertising function below.
Complete the viralAdvertising function below .