i made this post in order to help my students or perhaps my soon-to-be students to understand the very basic of programing, so i don't need to repeat it in class over and over again
here i will cover two popular programing languange, C++ and C#
wait!? no JAVA!? yes, i
okay!, let's start - レツスタト
C++ (pronounced see plus plus) is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as a "middle-level" language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs as an enhancement to the C programming language and originally named C with Classes. It was renamed C++ in 1983. (quote from wikipedia)
In order to create a program using C++ you will need a C++ compiler, such as Dev C++, Borland C++ Builder 6.0, or Microsoft Visual C++
example to create the infamous hello world syntax :
#includeint main()
{
std :: cout << "Hello, world!\n";
}
Okaay! pretty much alien languange isn't it? well, no need to worries, coz we'll track it one by one
Header :
#include
it's as the name suggest was head of the code, it's declare any file we might use to make our program, here we include file iostream, which is file that contain standard input output for C++
Main Function :
int main()
{
-----
-----
}
is a block of code where all of process executed, any code you wish to execute, should placed here (between '{' and '}' )
Statement :
std :: cout << "Hello, world!\n";
it's the code you wish to execute, here 'std::cout<<' is a standard syntax for output, while "Hello Word" is a string to showed, and '\n' is special key for space. Note that behind every statement you should put ';'
Well, since i already half asleep right now, i guees i stop it here for now, next time i gonna cover more compilcated interseting code, so good night everybody
Tidak ada komentar:
Posting Komentar