Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )
"Algorithm notes" learning record 001
First, today SLP
p1 ~ 13
Remarks:
- int type: less than 10 ^ 9; 32-bit integer.
- long long: less than 10 ^ 18; 64-bit integer.
- Big 32 than lowercase letters uppercase letters ASCII code.
- Character constants - must be a single character.
- Character constants in single quotation marks, and double quotation mark string constants.
- String constants can only be assigned to an array of characters, the character can not be assigned to a variable. (C language, C ++ has string type)
- % .1f-- one decimal output.
- Symbolic constants and const are constants defined constants of the two methods.
- The end of the macro definition does not add a semicolon.
Second, today's code analysis
2.01
#include <stdio.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
printf("%d",a+b);
return 0;
}
Thinking:
scanf("%d%d",&a,&b);
Proper operation: put a space becomes% d% d
wrong operation: adding a comma become% d,% d (can not give you the opportunity to enter the second parameter)
Third, the experience of reading
This book is useful structural expression, he said clearly wanted to read on.