desperately study for better
IP ,
knowledge, Skill, and
future

get started with C

Get started with c,
1. Download the bloodshed dev c in www.bloodshed.com and install it
2. Open the dev c and Read the help file carefully, it contains more than enough information and tutorial for c beginner
3. Just write some code and test it, the easiest way to test your code is press ctrl+f9 to compile the file, open the cmd (start --> run --> type “cmd” without colon --> press enter), go to the directory where you compile the file, drag the .exe file to your cmd.
4. Another way to test the file is press f9 after you finish write the code, but I will recommend you to add this code:

getch();

before the last “}”.
Why must we add the code ?, the getch(); code is used for waiting an input. So, the screen will be appear as long as you don’t enter any input
5. Okay, here is some sample code that I type for you, just ask yuki-chan or write in the shoutoutbox/comment box if you have problem or find any bugs :)

hello world
#include<stdio.h>
#include<conio.h>

main()
{printf("hello world");

getch();//with this the screen will not dissapear immediattely
}

Memasukan input

#include<stdio.h>
#include<conio.h>
#include <stdlib.h>

float bilangan1;
int bilangan2;


main()
{
printf("masukan bilangan desimal \n");
scanf("%f",&bilangan1 );
printf("bilangan yang tadi anda masukan adalah %f \n\n", bilangan1);

printf("masukan bilangan bulat \n");
scanf("%i",&bilangan2 );
printf("bilangan yang tadi anda masukan adalah %i \n\n", bilangan2);



getch();//with this the screen will not dissapear immediattely


}
Penjumlahan

#include<stdio.h>
#include<conio.h>
float bilangan1, bilangan2, hasil;

main()
{
printf("masukan bilangan pertama \n");
scanf("%f",&bilangan1 );
printf("masukan bilangan kedua \n");
scanf("%f",&bilangan2 );

hasil=bilangan1 + bilangan2;
printf("bilangan pertama ditambah bilangan kedua adalah %f", hasil);

getch();////with this the screen will not dissapear immediattely

}

Comments :

0 comments to “get started with C”