Thursday, February 15, 2018

write an program to calculator of two sum using constructor in c++

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
 class add
  { private: int x,y,s;
      public: add()
{ cout<<"enter two vallue of x,y:";
cin>>x>>y;
 s =x+y;
cout<<"add="<<s;
}
};
void main()
{add a;
   getch();
}

write an program to calculate simple interest using to construct in c++

#include<iostram.h>
#include<conio.h>
       class si
             { private: int p,t,r,si=0;
                public:interest()
     {cout<<"enter any value of p,t,r,:";
      cin>>p>>t>>r;
        si=p*t*r/100;
cout<<"si="<<si;
    }
};
void main()
  { si.s
    getch();
     }vvvvv

Wednesday, February 7, 2018

write an program to check even or odd using class

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
   class check
    {private:int x;
     public:void get()
{ cout<<"enter any number:";
cin>>x;
}
void show()
{ if(x%2==0)
  { cout<<"even=";
      }
else
{
cout<<"odd=";
}
  } };
void main()
{check c;
clrscr();
c.get();
c.show();
getch();
   }

Tuesday, February 6, 2018

Calculator in c++


#include<iostream.h>
int main()
   double num, den,result;
char op;
do  {
  cout<<"\ncalculator- enter number :";
 cin>>num;
cout<<"enter operator +,-,*,/:";
cin>>op;
cout<<enter second number:";
cin>>den;                                                                                       
if(op=='+') result= num+den;                                                           Run program
if(op=='-') result=num-den;
if(op=='*') result=num*den;
if(op=='/') result= num/den;
cout<<result;
}
wh
ile (op!='e');
  return 0;
   }

Monday, February 5, 2018

write an program to check even or odd using class in c++

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
   class check
    {private:int x;
     public:void get()
{ cout<<"enter any number:";
cin>>x;
}
void show()
{ if(x%2==0)
  { cout<<"even="<<x;
      }
else
{
cout<<"odd="<<x;
}
   };
void main()
{check c;
clrscr();
c.get();
c.show();
getch();
   }

Write an program in C++ to finding cube using inline function in c++

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
     inline int cube(int r)
{ return r*r*r;
            }
void main()
{
clrscr();
int r;
cout<<"program to compute cube\n";
cout<<"enter value of compute cube:";
cin>>r;
cout<<"cube of the number:"<<cube(r);
getch();
}

Sunday, February 4, 2018

Q) write a program to find a square root of a number using inline functuon in c++

Q) write a program to find a square root of a  number using inline function .
     program:
   #include<iostream.h>
  #include<conio.h>
inline int sqr(int num)
{ return num*num;
   }
  void main()
{ float n;
clrscr();
cout<<"enter a number:";
cin>>n;
cout<<"square="<<sqr(n)<<endl;
   getch();
}

Balkrishna Bhandari, : 8085 microprocessor program

Balkrishna Bhandari, : 8085 microprocessor program : write an assemble language program to add two 8-bit data 32H and 44H store result at 20...