C Language.. Not sure what ‘C’ mean but that’s what you’ll learn. I think it is a basic of basic for computer language.
Before you start programming, you will learn how it work. You will learn the concept of ALGORITHM; Pseudocode and Flowchart.
Below is example ALGORITHM for average people going to work
Begin
Get out of bed
Take off pajamas
Clean asses
Take a shower
Get dresses
Eat Breakfast
Carpool to work
End
Almost similar thing is programming, well if you understand the concept of it, everything then will be a lot easier, like if you playing a game, everything will be easier if you understand the rule. In other words,
YOU WILL LEARN THE RULE OF THE GAME BEFORE START PLAYING IT
Flowchart is like Begin-Input-Process-Output-End and Pseudocode is like what IF ELSE END
Then you will start programming.
There is several software that you can use like
My class use Borland C++, but Dev C++ is easier to download. I think both of it is freeware.
Anyway, you’ll learn how to make basic programming. In my case, I learn how to make unit conversion in C and several simple task. Following is the example startup question;
- Find the area for a triangle. Show the result for the area of the triangle.
- Count and show the result for the area of the square.
- Convert the value of feet to meter and show the result. One feet equivalent to 0.305 meter.
Of course, I have to answer it in C.
Now, let’s start programming!
This is an example source code to create a program that will converts distance in Miles to Kilometers.
/*
* Convert distance in miles to kilometers
*/
#include <stdio.h>
#define KMS_PER_MILES 1.609
int main(void) {
float kms, miles;
/* Get the distance in miles */
printf("Enter the distance in miles>");
scanf("%f", &miles);
/* Convert the distance to kilometres */
kms = KMS_PER_MILES * miles;
/* Dislplay the distance in kilometres */
printf("That equals %f kilometers", kms);
return 0;
}
Just copy and paste it, then Compile and Run it. Jang! Well, that’s the basic of it. Now, challenge your self by try it out by yourself! There is 3 an answered question above. It don’t really matter how you write it but what is the result is. Just ask for a question if you don’t get it.