For loop When we know about the terminating condition, but we don't know how many times the loop will execute, we use while loop. But at times we just want our code to run a fixed number of times, no matter what is in the statements, then for loop is used. The syntax of a … Continue reading Loops: Part 2
Tag: bloggingfundamentals
Loops: Part 1
Loops are used when we want a set of statements to execute until certain condition is satisfied or fulfilled. Loops can also be used when we want to take many inputs from the user. A while loop executes a block of statements as long as the condition remain true. The syntax of a while loop … Continue reading Loops: Part 1
Basics of Input & Output
I hope you are now sure about printing the output using the cout statement. Let us look at the ways to get input. The cin statement is used to get input from the user. We first need to define a variable in which the given input will be stored. For example: int a; cin>>a; //Note … Continue reading Basics of Input & Output
How to setup C++ in your system to start programming.
The first step to get started is setting up the C++ in your system. The following components are used to build C++ programs: 1. Integrated Development System (IDE) : It provides the necessary tools for writing source code . Any text editor can be used as an IDE. 2. Compiler: It compiles source code into … Continue reading How to setup C++ in your system to start programming.
