Search This Blog

Loading...

Variable Declaration in C++

Variables are basically Placeholders. It stores the values.

#include<iostream.h>
#include<conio.h>

void main()
{
    int a = 2;    // It will store 2 in a.
    int b = 3;    // It will store 3 in b.

    ans = a+b;    //It will add a and b;   

    cout << ans ;    //It will print the total.

    getch();
}

No comments:

Post a Comment