Professional Documents
Culture Documents
Alpro 1
Alpro 1
# include <conio.h>
using namespace std;
void instruct (void);
void pause () ;
int main (
double numl, num2, sum, product,quotient;
//executable section;
instruct );
cout<<"Enter first number: ";
cin>>numl;
cout<<"Enter second number : =
cin>>num2 ;
sum=numl+num2;
product=numl*num2
quotient=numl/num2
cout<<"\nThe
sumof"<<nunl <<" and"<<num2<<"is"<<sum<<" \nThe
product
by"<<num2<<"is" <<product <<"\nThequotient
by"<<num2<<"is"<<quotient<<endl;
of"<<numl<<"multiplied
of"<<numl<<"divided
cout<<" \nThe
<<endl;
difference
of
the
follows:
two
number
is
as
if (numl==num2) cout<<numl<<"is equal to"<<num2<<endl;
if (num1 !=num2) cout<<numl<<"is not equal to"<<num2<<endl;
if
(numl<num2) cout<<numl<<"is less than"<<num2<endl;
if
(numl>num2) cout<<num1<<"is greater than"<<num2<<endl;
if
(numl<num2) cout<<numl<<"is
less
than
equal
or
to"<<num2<<endl;
alpro 2
alpro 3