Uses cout statements to display the value of assignment statement, age = 18. - C++ Language Basics

C++ examples for Language Basics:Variable

Description

Uses cout statements to display the value of assignment statement, age = 18.

Demo Code

#include <iostream>
using namespace std;
int main()//from w  w  w  .j  ava  2 s  .c  o m
{
   int age = 18;
   cout << "The value of the first expression is " << (age + 5) << endl;
   cout << "The value of the second expression is " << (age = 30) << endl;
   cout << "The value of the third expression is " << (age == 40) << endl;
   return 0;
}

Result


Related Tutorials