How to create a variable and assign value to it - C++ Language Basics

C++ examples for Language Basics:Variable

Description

How to create a variable and assign value to it

Demo Code

#include <iostream> 

using namespace std; 

int main() //from  ww w .j av a2 s . co  m
{ 
  int mynumber; 

  mynumber = 10; 

  cout << mynumber << endl; 
  return 0; 
}

Result


Related Tutorials