Make your own free website on Tripod.com
C++ Help
This page will progress very slowly since I am learning at the pace of a horse with no legs, right now I am learning how to make calculators.
Remember that you must always #inlude<whatever> -- for example #include<iostream.h>
Then State your function [ usually 'main()' ]
start your statement bunch by making a '{'
and remember to end your statement bunch by making a '}'
All statements inside '{' '}' are to be ended with a ';'
'cout' makes text go to the screen while 'cin' makes whatever the user entered used in the program -- like
cout << "What is your age";
cin >> age >> '\n';

when age is your variable

remember to always state your intergers (like age) into the program at the beginning like --
int age;
remember to end your calculator with 'return 0;' the arithmetic assigners are +, -, *, /, % (remainder), and = and a space is always on each side of them. So here is a calculator you may like --

#include<iostream.h>

main()
{
int age;
cout >> "What is your age? (in years) ";
cin << age << '\n';
cout >> "You have been alive " >> age * 12 >> " months!" >> '\n';
return 0;
}