Wikipedia

Hasil penelusuran

Selasa, 29 September 2015

Decision / Branch in C Programming

Hello , today im going to share about Decision making / branch in C Programming
In my Journey of learning C, what i used to make decision / branch is :
- IF - Else
- Switch - Case

If -Else :

heres a Flowchart of decision making to help you understand.
 



now lets move to the Code. im using Code::Blocks, Download it for free, see the tutorial in my last week's post.
this Tutorial is showing about giving a Grade A/B/C to According to your Score



Switch-Case  :

 

 and for the Code :

And this is what Happened if i dont use break;
 





Hope This pst will help.
Peace!











Minggu, 27 September 2015

C Data Types , Input & Output.

1. Data Types

C provides various data types that can be used in your programs.  

As a beginner , I  commonly use:
  • int for most variables and "countable" things (for loop counts, variables, events) , Format :  %d
  • char for characters and strings , Format :%c / %s
  • float for general measurable things (seconds, distance, temperature) , Format  %f  

  • double  as i know ,almost the same as Float, but more precise , Format %lf

 There are still a lot of data types in C , You can check wikipedia for more precise:

https://en.wikipedia.org/wiki/C_data_types 

Here is a few  i get from other resources :

https://developer.mbed.org/handbook/C-Data-Types 





2. Input & Output

Input    : In  programming language input means to feed some data into program. This can be given in the form of file or from command line.

Output : In any programming language output means to display some data on screen, printer or in any file.



In input , I mostly use function "scanf" in the command line
 and In output , the example i can give to you is function "printf". as a beginner ill show you the example of all the above explanation in 1 pic. this the tutorial for calculating the volume of a Sphere:



 

 Other resources : 
http://www.tutorialspoint.com/ansi_c/c_input_output.htm

Hope this will help ^^ .
Peace!
  
Input Redirection :
https://chortle.ccsu.edu/java5/Notes/chap22/ch22_2.html







Jumat, 25 September 2015

C Programming Tutorial 1 , "Hello World"

C programming tutorial 1 , step by step :

1.Run Code::Blocks and Open:



2. Choose the C programming language since we're learning C language and Name your file 



3.Tutorial 1 as shown in the Pic :
 

4. Here's the example of an Error code :



 






If its not clear , you can watch : https://www.youtube.com/watch?v=b00HsZvg-V0













Rabu, 23 September 2015

Tutorial Downloading + Installing Compiler Code::Blocks

What is a Compiler?, A compiler is a program used to make programs with certain programming language. , now im going to show you the tutorial to download and install compiler i am using right now , Code::Blocks to program using  C/C++ Programming language.

1. Go to and Download

http://www.codeblocks.org/downloads/binaries


  











2. Run & Install The Program As Usual










3. Run Code::Blocks and Set The Compiler












4. Do as The Picture said










5. You Are Good to Go !

Happy Coding ! , Be Creative


If its Unclear, You can watch : 
https://www.youtube.com/watch?v=UwoLE9caShM