variable
definition
comments
// Filename: DISSECT.CPP
// Simple program for you to analyze
preprocessor
directive
function name
#include <iostream.h>
void main()
{
int age, weight; char initial; float salary;
// These lines define four variables
age = 13; weight = age * 6; initial = 'D‘;
salary = 200.50;
salary = salary *
// Assign an integer literał to age // Assign a weight based on a formula // Ali character literals are // enclosed in single quotes // salary requires a floating-point value // because it was defined to be a floating 2.5; // Change what was in salary
// The next linę sends the values of the variables to the ser cout « age « « weight « « initial « « s
return;
end of main()
}
// Good habit to end programs // and functions with return
comments