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();
}

No comments:

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...