WAP to understand library function.

//program to understand library function
#include <iostream>// header file
#include<cmath>     // header file to handle mathematical functions
using namespace std;//to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler
int main()
    double number,number_square;// declaration of variables
    cout << "enter a number" << endl;// input message
    cin>>number;                    // accepts input
    number_square=pow(number,2);    // finds square and stores in variable
    cout<<"square ="<<number_square;// prints output.
    return 0;

No comments:

Post a Comment