Monday, 8 July 2013

Find Square of a number in C++

#include<iostream.h>
#include<conio.h>
void main()
{
    clrscr();
    float n,a;
    cout<<"Enter any number : ";
    cin>>n;
    a = n*n;
    cout<<"Square of "<<n<<" is = "<<a;
    getch();
}

No comments:

Post a Comment