c program structure is as follows:
(header file)
header file is a form of libraries to call a certain function
For example:
# include,
# include
(data dictionary)
data dictionary to determine the type function that will be used
For example:
int x; / * means that the function x is an integer (Numbers rounded) * /
float y; / * y is a float means fingsi (Num. real) * /
(loss program)
all the contents of any agency program here
beginning of the body programs are:
int main () / * This is the main menu program body * /
{/ * this is a function of starting the program * /
/ / below will be the contents of the program
printf ("Welcome to DC"); / * printf function will display the text inside ("") * /
/ / always remember to close the function with;
scanf ("% i", & x); / * scanf function will store the data in the input by the user who is bil. round (i, for integer) the function x
printf ("% i", x); / * in this function is the screen will display the results of the scan / input in function of x that are integers (i) * /
system ("pause"); / * for the program is not simply shut down * /
return = 0 / * to exit the program * /
} / * indicates that the agency program ends * /
FINISHED
completed for a brief explanation,
sorry if there is an error word
0 komentar:
Posting Komentar