Skip to main content

Command Palette

Search for a command to run...

CS50x: Week 1 : C

Published
1 min read
M

a sophomore year engineering student learning to code

In the second week i.e. Week 1 we were introduced to the programming language C. Where I learnt about the basics of the C language: header files, variables, print function, conditional statements and functions.

After the main lecture and some short videos, Lab 1 was a nice session where they revised the lecture and gave us a problem to solve. We had to determine the number of years it would need for a population to grow from a current population to a goal population. The population increases by 1/3 of the current population (cp) and decreases by 1/4 of cp thus we have a mathematical equation and thus I was able to code the solution.
The problem set was very interesting as well. With some hints, I was able to figure out the solution by myself. It felt rewarding after seeing my code pass all the conditions and cases. Here is the link to the pset1. Happy coding!