September 14, 2016

C Loops and Decision Explained with Examples


C Loops and Decision Explained with Examples


Hello friends, now I want to share a little bit about what I had learned yesterday about Programming Concepts.



So, in the matter last week, I discuss the Conversion, Decision, Function, Array, Looping.

but, here I'll repeat a little discussion about the looping and decision .



  • Looping

In programming languages, looping is a process that is done repeatedly until the specified limits,

and there are three ways to do looping in c ++, using

  • For
  • While
  • Do-While

So friends lets make a simple program uses looping in c ++

  • For



  • While



  • Do-While




So, the difference between the FOR, WHILE, and DO-WHILE:



  • For:


To repeat the process a known amount.

  • While:


To repeat the process as yet unknown amount.
at the first check will be performed if the condition is true then the loop will continue

  • Do-while:


To repeat a process that is not yet known amount.
Instruction is executed first, and then check the condition
if they are true then the loop will continue


Explanation

Repetition will be conducted from 0-10, meaning there 11x repetition.
Meaning of variable x = 0 is the initial value of x is 0.
Meaning x <= 10 is the maximum repetition is done is up to 10.
Meaning x ++ is the added value of each repetition is already in execution,
Her example if we had put the value at x [0], it will immediately go to x [1]
and so on up to x [10].


-------------------------------------------------------------------------------------------

  • Decision

So friends lets make a simple program uses looping in c ++

  • If-Else





           Explanation


If - Else = "if true, the commands will be done according to the order, and if it does not qualify to true then the command will be routed using else"



  • Switch-Case



      Explanation


Decision-making that involves a lot of ways settlement.

-------------------------------------------------------------------------------------------


Finished friends, this is a simple program  in c ++, I'm sorry if it is less clear in his explanation because I am still a beginner and learning stage.





September 08, 2016

Installing Dev C++ on Windows 8.1

Installing Dev C++ On Windows 8.1

Before we begin the explanation about how to install the dev c ++ in Windows 8.1, it is better if we know about the differences between the interpreter / compiler / editor and IDE.

Interpreter is a translation system source code programmer results that can be understood by computers.
Compiler is a system that combines all the source code and examine the results programmer that can be understood by computers.
Editor is an application for writing, editing, assembling a variety of source code programmer.
IDE (integrated Development Environtment) is a joint program between Editor and Compiler.

So, editor and compiler is a combination of the IDE, the results of source code written in the editor will need a compiler to check the results of the code to be understood by a computer and printed the results of the program.

Now we will start to install Dev C ++ on Windows 8.1, before installing course, we must have the application by downloading on google.
.
.
.
once downloaded then inserted into a folder that is not mixed with other downloadable applications
:D



Open the file that has been downloaded by clicking 2 times on the file and wait until 100%.



so it appears the language selection menu. Select the appropriate installation language and can be understood yes.



and will perform "License Agreement" read, and then click "I Agree".


then will perform "choose component", a checklist and then click on "next".



then select where to save the program, select the appropriate location (and usually in Disk C) and click install.



If successful, the installation process will take place.



and wait until the installation is complete.


and finally!!!! completed application installed.

.
.
.
After successfully installing the Dev C ++ then we will make a simple program, simply because it is still a beginner. : D

First of all clicks his Dev C ++ on the desktop or in the start menu to open the application and create a program.



then select File -> New -> Source File.



then write the source code.



After writing the source code, Compile the program by clicking Execute -> compile or click F9, then save with the .cpp, for example task.cpp.









Run the program by clicking Execute -> Run or click F10



and input the number and then click enter.












Yuhuuuuuuuuuuuuuuuuuuuuu !!! congratulation friends managed and successfully create a simple program in C ++.