Binary addition of two binary numbers using class, object oriented concept in c++
Q. Program to print the sum of two binary numbers by taking two user inputs
9548086042 for call girls in Indira Nagar with room service
Binary addition using class concept in c++
1. /*
Program to print the sum of two binary numbers by taking two user inputs
*/
#include<iostream>
#include<stdlib.h>
using namespace std;
class binary
{
int a[4];
int b[4];
int c[5];
public:
void geta(int x,int y)
{
if(y!=0)
{
if(y!=1)
{
cout<<"wrong digit";
exit(0);
}
}
a[x]=y;
}
void getb(int u,int v)
{
if(v!=0)
{
if(v!=1)
{
cout<<"n Wrong digit";
exit(1);
}
}
b[u]=v;
}