------------------------------------------------------------------------------
MC logo
Shortcut Operators
[^] CSc 220 Home
------------------------------------------------------------------------------
[Introduction] [Boolean and Control] [Functions] [Arrays and Pointers] [Dynamic Arrays] [Array Errors] [Command Array] [Standard Containers] [Structs and Classes] [Automatic Pointer] [Multi-File Programs] [Copying Objects] [Templates] [Inheritance] [Plain C I/O] [Type Odds And Ends] [Plain C Strings] [File I/O]
[Standards] [Programming Environment] [Hello, World!] [Hello Again, World!] [Identifiers] [Constants] [Average of Three] [Basic Types] [Shortcut Operators] [Increment Operators] [C++ Strings]
shortcut.cpp
#include <iostream>
using namespace std;

int main() 
{
        int z = 10;
        int y = 6;

        z += 5;
        y *= 3;
        cout << z << " " << y << endl;

        int p = y -= 10;
        cout << p << " " << y << endl;
}