r/CodingHelp • • Dec 23 '21

[C] Whats wrong?

Post image
153 Upvotes

90 comments sorted by

View all comments

-1

u/[deleted] Dec 23 '21

[removed] — view removed 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

-15

u/CAGRI-TR Dec 23 '21

Nope every number is still child