This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: z and then uses it when the user enters it. int z; cin>> z; Two inputs: int z; int a; cin>>z>>a;-Multiple inputs are seperated by white space (space, tab, or return) Comments: Used to keep track of what you are doing when codes begin to get longer. When using comments you can write comments in the code that the compiler will ignore. \\ (will ignore this line) /* (will ignore everything between the two slashes and stars) *\ Mathematical Stuff: addition, subtraction, and multiplication Depending on whether or not you use a double or an int it will just add(+) subtract(-) and multiply(*) when you tell it to double total = 0.01 + 0.24; cout<<"Total =" << total << "\n"; This would display: Total=.25 Devision: Inter division: 7/4=1 % will give you the remainder of integer division 7%4=3 Floating Point division: 7.0/4=1.75 (one of the numbers has to be a double)...
View Full Document
- Spring '08
- Remainder, Rational number, floating point number, fundamental data types