#include <cs50.h>
#include <stdio.h>

int main()
int n get_int();

The C syntax for variable declaration and value assignment in a single declaration is as follows

int variable_name = value;

The get_int() function returns the int equivalent to the line read from stdin and in order to assign the returned value, the correct syntax would be

int n = get_int();

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .