I'm learning C as my first programming language. I'm confused on how do loops work in real-life. In programming every function has a reason.
example - if/else statements are used if we have conditions. Nesting if/else statements are used if we have conditions inside a condition(more condition).
I am going to try my best answering this using a real-life problem. I tend to understand better using Facebook as an example.
Let's say a user is signing up for Facebook. We don't want users signing up of age less than 13 years old. If users age is less than 13, it should terminate the sign up page and give a reason saying "Sorry, you're too young". Do we use if/else statement behind situation? Please correct me if I'm wrong.
Now, Loops are used for shortening up the program/application. What's the real-life analogy behind this? Using Facebook as an example.
Can 'News Feed' be a strong example of using Loops?