Using the assignment operator : Introduction « Language Basics « C++ Tutorial






#include <iostream>              
using std::cout;
using std::endl;

int main() {
  int a = 10;
  int b = 6;
  int c = 3;
  int d = 4;

  int f = (a + b)/(c + d);

  cout << f ;

  return 0;
}
2








1.1.Introduction
1.1.1.This is a simple C++ program
1.1.2.Calculating with integer constants
1.1.3.Working with integer variables
1.1.4.Using the assignment operator