Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Sum of Two Numbers Until User Want to Stop in C++

//SUM OF TWO NUMBERS UNTIL USER WANT TO STOP THE PROCESS

#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
class add
{
int a,b,c;
char choice;
public:
void addnum()
{
while(1)
{
cout<<"Enter a and b values:";
cin>>a>>b;
c=a+b;
cout<<"a+b="<<c;
cout<<"Do u want to contimue(y/n):";
cin>>choice;

if ( choice == 'y'|| choice == 'Y')
continue;
else
exit(0);
}
}
};
void main()
{
add ad;
clrscr();
ad.addnum();
getch();
}