Determining coefficient in geometric progression
In the if statement inside the while loop,
since the method returns when the condition is true,
you can drop the else.

In the condition of the while, you have pointless parentheses.

When printing stuff without variables,
I prefer puts instead of printf because it's shorter.

scanf_s doesn't compile with my compiler gcc.
I don't know what it is, but replacing with scanf seems to work fine for me.

Notice in your question that the syntax highlighter made Num have a different color from other variables.
It's because CamelCase is usually used for class names,
and camelCase for variable names.
So I'd rename this to num, or thisNum (to sort of harmonize with prevNum).

Pay attention to formatting. It makes the code more readable. For example:


You didn't indent the main body, then after the while loop you indented.
There are pointless blank lines in the while loop that just look strange.


With the above suggestions applied:

#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

int main() {
    int prevNum;
    scanf("%i", &amp;prevNum);
    int thisNum;
    scanf("%i", &amp;thisNum);
    int r = thisNum / prevNum;
    prevNum = thisNum;
    while (scanf("%i", &amp;thisNum) != EOF)
    {
        if (thisNum / prevNum != r)
        {
            puts("No progression");
            return 0;
        }
        prevNum = thisNum;
    }
    printf("Progression with r=%i \n", r);
    return 0;
}