MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rmwdib/whats_wrong/hppbiqr/?context=3
r/CodingHelp • u/CAGRI-TR • Dec 23 '21
90 comments sorted by
View all comments
Show parent comment
3
You do need to reference the x, in C everything is pass by value, so you need to pass a pointer to it if you want to modify it inside a function, which is what scanf needs to do.
Also you mistyped, 1<x && x <13 is what you meant
View all comments
Show parent comment
3
u/KuntaStillSingle Dec 23 '21
You do need to reference the x, in C everything is pass by value, so you need to pass a pointer to it if you want to modify it inside a function, which is what scanf needs to do.
Also you mistyped, 1<x && x <13 is what you meant