C++ Program – Square of Nos

by Nideesh C on May 2, 2011 · 0 comments

in C++




//Downloaded From theonlinetutorials.com
//(C)1999.All rights reserved.
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
float a,b,c,d,e;
cout<<"Enter a number :"<<endl;
cin>>a;
b=pow(a,2);
c=pow(a,3);
d=pow(a,4);
e=pow(a,5);
cout<<"Result = "<<b<<","<<c<<","<<d<<","<<e;
getch();
}



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. Sample – compute square roots using Newton’s method
  2. C++ program – Sum of n even Nos
  3. C Program To find the sum of the cos series
  4. C++ program – Square or Cube According Input
  5. C++ program – Implementation of class

Leave a Comment

Previous post:

Next post: