A compiler translates human readable code in some high-level language to machine code that can run on a specific processor (CPU). Processors generally have a comparison instruction that enables them to determine whether one number is larger than another, smaller than another, or equal to another. The comparison of two values a and b is usually done by subtraction; if the result of a - b is positive, a is larger than b; if a - b is negative, a is less than b; if a - b is zero, a is equal to b.Hi
Please remember that I have no knowledge of computer programming and not a student of science or math.
1: I was wondering how in the first place a computer would determine which number is the largest because it has no intelligence of its own. So, there should be some second algorithm or some procedure which helps computer to know the number '9' is smaller than '10'.
There are lots of C++ compilers out there. Some are free and some you have to pay for. When you choose one you will need to get one that runs on whatever operating system you're using - Windows, or some variant of Linux, or one of the Apple OSes.2: Where do I get this C++ compiler? Doesn't C++ let you create a software with GUI where you can enter your four numbers and clicking some button tells you the largest one? How do I learn some VERY basic "scaffolding" and 'extra details' of C++ to do simple software such as the one to find the largest number?
You can use C++ or C# or Java or other high-level languages to create a GUI that displays a form with four text boxes and a button that the user can click to make the form display the largest of the four numbers. This sort of program is typically implemented using events - i.e., when the button is clicked, an event is raised, and a method/function in your program responds by finding the largest number and displaying it in your form.
For GUI-type programs, I would recommend C# or Java over C++, as they would be simpler to write, IMO.