My last post was about the use of ”if” as a condition in c++. Now I should complement that post with an explanation about ”else”. When we use ”if”, we declare a condition. Then we make our program do something under that condition. But, what happens if the condition is not accomplished? Well, if we […]
Today I am going to explain you what “if” is for in c++. Here’s a video done by myself for you: And now here’s a simple code example: #include <iostream> using namespace std; int hours; int main() { cout<<“How many hours of study do you need to approve?”; cin>>hours; if (hours>5) cout<<“You should start now”<<endl; […]