100 Days of Code- Day 5

Devanshu yadav
2 min readFeb 4, 2021

Module 1 (Basics and Control Structures) completed!

After day 4, I read about more functions on Precision, Types of loops, if-else statements, and switch statements.

One thing that I feel I should share if newbies are reading this, that learning basics might sometimes feel like you are wasting your time and that you should be learning advanced algorithms but whenever you encounter problems based on these basics, it saves you from a lot of googling time.

Just like these precision control that I read. I am sure many of the new joiners don’t learn about precision control, or if they do, Setprecision marks their limit most of the time. While there are many functions apart from that.

Floor() and Ceil() functions: if you belong to a science background, you might have encountered “smallest integer function” and “greatest integer function”. Well, floor() and Ceil() are the smallest and the greatest integer functions respectively.

Trunc() function: In Case, a problem arises where you just want the integer part of a number, Trunc() does the work for you. It prints just the integer part of a floating-point.

using Floor(), Ceil(), Trunc() and setprecision in C++

In the end, Module-1 contained some very basic information about the if-else, nested-if-else, if-else-if tree, while loop, do-while loop, for loop, and the switch statement.

All these control structures are a must-know for everyone and there’s nothing Important I can point out for the readers. Since everything’s important.

Believe me, Any skilled programmer in C++ would hardly object that these functions mentioned above are Essential. Though there are many crucial topics too.

But It’s like you can’t learn how to make words if you don’t know the alphabet.

I hope you get it now.

And since I completed this one module in 5 days, and my goal according to Geeks for Geeks was to complete all 6 modules in between Day 1 to Day 11, I should either speed up or do the math and name this whole course 100+X days of code. I am not confident about either right now.

Considering my second semester is now going to begin 8th February onwards, which I thought would be 22nd February. My bad. Now I’d either reschedule, Speed up or Stretch the number of days.

For now, that is it for Day 5, Module-2 has been started. It’s about arrays and strings.

I’ll talk about it on day 6. Till then take care.

--

--