Учебное пособие: C++ Builder. Введение в структурное программирование
//----------------------------
#pragma argsused
int main(int argc, char** argv)
{int a, b;
b = 10;
a = b++;
cout << "a = " << a << " b = " << b << endl;
b = 10;
a = ++b;
cout << "a = " << a << " b = " << b << endl;
getch();
return 0;
}
Пример 3.
#pragma hdrstop
#include <condefs.h>
#include <iostream.h>
#include <conio.h>
//----------------------------
#pragma argsused
int main(int argc, char** argv)
{ int a, b;
float a1,b1;
a = 5; b = 3;
cout << "a / b = " << a/ b << endl
<<"a % b = "<<a%b<<endl;
a1 = 5; b1 = 3;
cout << "a1 / b1 = " << a1/ b1 << endl;
getch();