Skip to main content

C++ Tutorials

How to write a sample Programme in C++ Application













Create a console application using VisualStudio

endl//new line
getch()console.readkey
clrscr() clear screen

#Include <ioStream.h>

void main(){

int a=10;
int b=20;
int c=a+b;
cout<<"Addition Value is "<<c;

or
int a,b,c; //Identifier || variable
a=20;
b=30';
c=a+b;
cout<<"Addition Value is "<<c;
getch();//console readkey



//get the key input from keyboard

#include <ioStream.h>

void Main(){

int a,b,c;
cout<<""Enter a valid number";
cin>>a>>b;
c=a+b;
cout<<"Results"<<c;
getch();









Comments