// This is the note, record the first day
#include <stdio.h> /* head File stdio refers to "standard input & output" (standard output) Therefore, when the source code is used as the standard input and output functions, it must include the header! E.g. c language printf ( "% d", i); function or the like; scanf ( "% d", & i). In double quotation marks header files, which means looking for this header file to find in the same directory as the following include "test.h" */ int main(void) { printf ( " --- switch background management ---- \ the n- " ); printf ( " login \ the n- " ); printf ( " Create an account \ the n- " ); printf ( " delete account \ the n- " ); printf ( " Exit \ the n- " ); printf ( " Name:% s martial art:% s force value:% d \ the n- " , " Joe Smith crazy " , " non-partisan " , 89 ); the printf ( " Pi:% 20f \ n-. " , 3.1415926 ); return 0; } /* main function mian is the single entry program, a program can have only one main function the main function returns an int integer General usage: Program ended successfully, with the main function returns 0 Program ends abnormally, the main function returns with a number greater than 0 */ /* Line breaks and tabs \ N newline \ T Tab: text may be aligned vertically */ /* printf () function call format is: printf ( "<format string>", <argument list>). % S% c and commonly used in like printf, sprintf string formatting functions, parameters for formatting the data type is determined. The printf ( "% s", a) will be a variable Formatted string type. */ /* The format specification "%" and formatting characters representing the data output from the converter to the specified output format. Format Description always by the "%" character began. %% percent sign printed, are not converted. % C integer converted to the corresponding ASCII characters. % D converted to decimal integer. % F converted into double precision floating point number, i.e. after the decimal point 6 % .20f after the decimal point indicates accurate to 20 20% 20f represents a placeholder, starting from the right, no digital place filled with spaces % O Integer into octal. % S Integer translated into strings. % X an integer to lower case hexadecimal. % X Integer to uppercase hex. % X output integer in hexadecimal form, or the address of the output string. % U unsigned decimal number to the data type (unsigned). Note: d% u whether a value range of symbols, that is, the value of% limit, otherwise the value will be printed out by mistake. % E real output exponentially, % G automatically selected f or e format depending on the size format, does not output the zero meaningless. */