I am developing a calculator program in c++. But the problem is when I try to convert the character into integer it shows runtime error. The code is given below.
#include<iostream.h>
#include<conio.h>
void main()
{
   clrscr();
   int num,sum=0;
   cout<<"Enter the number"<<endl;
   cin>>num;
   while(num!='=')
   {
      sum=sum+num;
      cin>>num;
   }
   cout<<"The sum is"<<endl;
   getch();
}
The program runs well i.e it takes the input correctly but when I used to press '=' sign then it shows nothing but only the black screen. Please help me. Thankyou.
 
     
     
     
    