You can find my video here:
#Mastery6 #Mastery18 #TC101 #TC1017
Hope it helps!
]]>
#Mastery6 #Mastery18 #TC101 #TC1017
Hope it helps!
]]>
Here is the link to my code:
]]>
Some important links:
Oracle Virtual Machine – https://www.virtualbox.org/wiki/Downloads
Ubuntu ISO Downlaod – http://www.ubuntu.com/download/desktop
Here’s the video:
]]>
I have successfully installed Linux (Ubuntu) on my own computer:
]]>
So I have to go to Plan B, I install Linux in my computer, specifically in my USB.
Here is a video of how do I do it, it was also mastery 6 for Ken’s Course
This two concepts are input and output, and it’s what we are going to talk about in this post.
First, their definition:
Output:
Any information that has been processed by and sent out from a computer or similar device is considered output.
Input:
Any information or data that is sent to a computer for processing is considered input. Input or user input is most often sent to the computer using an input device such as a keyboard or mouse.
Header Files:
To do input and output, you will need to load the iostream header file.
Like this:
#include <iostream> // I/O #include <fstream> // file I/O #include <iomanip> // format manipulation #include <string>
Which means that you’re confirming that your program will have the ability to receive and send information and manipulate it as you tell it to do it.
Streams:
There only exist 3 streams, which are:
Cout (terminal output)
Cin (Terminal input)
Cerr (error output) Mosly used for error messages.
Here are some code examples where you can see Cout and Cin:
#include <iostream> using namespace std; int main () { int v1, v2; int sum =0; cout<< "Please introduce the lower bound of the range: "; cin>> v1; cout<< "Please introduce the higher bound of the range: "; cin>> v2; int number =v1; while (number<=v2){ sum= sum+number; number++; } cout<< "The inclusive sum is: "<<sum<<endl; return 0; }
I really hope this post can help to solve your doubts about Input/Output in C++, if you want to know more abot this I will let you the link of a really good page!
Once again, feel free to ask anything and I will be happy to answer.
Have a nice day!
-The Admin.
]]>