PetraAI / Additional algorithm 2.cpp
PetraAI's picture
Upload 136 files
3da5d57
//Paul A. Gagniuc. An Introduction to Programming Languages: Simultaneous Learning in Multiple Coding Environments. Synthesis Lectures on Computer Science. Springer International Publishing, 2023, pp. 1-280.
//Additional algorithm 2. Examples of assignments are shown for multiple computer languages. An important observation is that VB refers to Visual Basic 6.0 (VB6) and VBA syntax, namely the last version of Visual Basic. Thus VB6 lacks aggregate assignment as this style is a relatively new addition to computer languages. VB6 can explicitly declare multiple variables for a certain data type (Dim a, b, c As Integer), however, it lacks the posibility for multiple assignment. Note that the source code is out of context and is intended for explanation of the method.
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
a = 1;
a += 1;
a = b = c = 1;
cout<<(a + b + c);
return 0;
}