This program is supposed to calculate the mathemathical maximum of helpful flags you can have on the nth day, starting with 0 helpful flags, using the StackExchange system of gaining more possible flags, meaning every 10 helpful flags you gain one possible one, immediately.#include <stdio.h>// <summary>// Small C program to simulate how many helpful flags someone could have raised on both comments and posts// Assumptions:// - Flags would be immediately marked helpful or near immediately// - Every 10 flags, you get one extra flag per day, up to 100 total flags.// - No declined flags// @Author: Magisch - http://stackoverflow.com/users/5389107/magisch// @License: CC0// </summary>int main(void) {    int nDays = 0; // Days to simulate for    int totalFlags = 0;     int dailyFlags = 10;    int bonusCountdown = 0;    int totalFlagsBeforeCalc = 0;    printf(Enter the amount of days you want to simulate flags for:\n);    scanf(%d , &nDays);    printf(Computing maximum helpful comment flags and post flags for %d days.\n,nDays);    for (int i = 0; i < nDays; i++) {        totalFlags += dailyFlags;        bonusCountdown += (totalFlags - totalFlagsBeforeCalc);        totalFlagsBeforeCalc = totalFlags;        while (bonusCountdown >= 10 && dailyFlags < 100) {            dailyFlags++;            totalFlags++;            bonusCountdown -= 10;        }        printf(Day %d : total helpful flags: %d | daily available flags: %d\n, i+1, 2*totalFlags, dailyFlags);    }    printf(Simulated %d days. Total helpful flags: %d,nDays,2*totalFlags);    return 0;}Example of the Results for n = 52 : http://pastebin.com/TbjRPjBnI'm a beginner still in coding (second year apprentice), so please don't hold back on any critique.
Calculate maximum possible helpful flags for n days
c;c11