Rabu, 21 September 2016

Syntax (Decision, Loops, Array, Function)


Hello again
this is my second entry to post to this blog
today i will show you what is syntax (Parts, Definition, And How-To)

Parts

In basic syntax there 4 type all the syntax there are many different and purpose, the list of syntax which is :
  1. - Decision
  2. - Loops
  3. - Array
  4. - Function 
  now let me give you definition and How-To compile based on the list

1. Decision

  1.  Decision is to make program the specifies one thing and another thing based on conditions, using the true or false. There are 3 type in decision which is:
  • if
  • if... else
  • switch case

1- Decision ( if )

(INPUT)

 (OUTPUT)

2- if.... else

(INPUT)
(OUTPUT)
 
What the difference between if and if else, if based on true condition while the if... else there are false condition that can specifies which number that can put in group using else if and else statement


3- Switch Case

(INPUT)
 
 (OUTPUT)
 

if you did not put (break;) after case to other case the result is print as first case and the next case like the picture below :











 Switch case is a switch statement allows a variable to be tested for equality against a list of values.

2. Loops

loop is the statement to execute for multiple times first, second, an so on. Loop is divided become 3 types which is :

  • while
  • do while
  • for

1- while

(INPUT)
 
 (OUTPUT)
 

2- do while

 (INPUT)
 (OUTPUT)

 difference between while and do while is while must be check and repeat it until reach the end of the loop, do while must execute first before the number is check and repeat it until the end of the loop.

3- for

(INPUT)
 (OUTPUT)
 for is loop execute using the absolute number.

3.Array

Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. there are 2 types which is :
  • Array
  • Multi-Dimensional Array

1- Array 

(INPUT)
 (OUTPUT)

 2- Multi-Dimensional Array

(INPUT)
 
 (OUTPUT)
The works of Multi-Dimensional Array is different from Array because Multi-Dimensional Array using Rows And Column for example in picture below :

As you can see they start from Row 0 and Column 0. example if index is A [3][2] it mean that the number is (6)

4. Function

Function is a function is a group of statements that together perform a task..

1-Function

 (INPUT)
(OUTPUT)

(+)

(-)

(*)

(/)





Now you Know about the syntax from Decision, Loop, Array, and Function
That all from me
See you Next Time

Rabu, 14 September 2016

Compiler, Integrated development environment ( IDE ) ( Explaination, Download, Install, How-To)

Integrated Development Environment = Integrated Development Environment (IDE) is a software suite that consolidates the basic tools developers need to write and test software. Typically, an IDE contains a code editor, a Compiler or Interpreter and a debugger that the developer accesses through a single graphical user interface (GUI).

Compiler = A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor use

Interpreter = computer language processor that translates a program line-by-line (statement-by-statement) and carries out the specified actions in sequance


Download And Installing Microsoft Visual Studio 2012 Ultimate (MVS2012)

1. First, Type in google "Download Microsoft Visual Studio 2012" and Click Link from Microsoft 
2. Second, Scroll down and click download button
3. Third, check the FILE NAME and click next. and your MSV2012 be downloaded
 4. Fourth, Click on the circle

5. Fifth, Click "I Agree to the license terms and condition" and press next button
 
 6. Sixth, Mark the "Select all" and press the install button





7. Seventh, wait installing process




















8. Eight, Install is finish and press restart button to synch the computer




















How-To Basic.
After, installing the the program now we can proceed to programing concept first basic is "Hello World" so lets begin :

1. Open the visual studio (for windows 7 win button > type visual studio > Click ) 
2. Click New Project ( There are two ways first click "New Project" or File > New > Project








3. Choose "Win32 Console Application" and Press Ok













4. After That, Click Next And Check "Console Application" And "Empty Project

 

















5. Right Click mouse Consoleapplication10 (Project Name) > Add > New Item













6. Choose C++ File(.cpp) and Click Next


7. Next, Type The Like The example

  • #include <stdio.h>
  • void main()
  • {
  •         printf("Hello World! \n");
  • }
     
    For "Hello World!" you can change it as you like as long not forget put(")
      


And Debug > Start Debugging

8. If Command Prompt (cmd) Response like the image it is means your program is success

 








Know You are know Differences between Compiler, IDE, interpreter. and know how to download, install, and How-To First programming, i hope you enjoy my blog

See Ya

Reference :
http://www.businessdictionary.com
http://whatis.techtarget.com/
http://searchsoftwarequality.techtarget.com
http://wikipedia.com 
how  the
Read more: http://www.businessdictionary.com/definition/interpreter.html