Welcome

Hi! This blog is for beginners of c++ and java .You can check and pick codes for your programming assignments. This will also help you to understand the concepts of these programming languages. Its all about programming.

Functions Basic 3

Friday, May 20, 2011

#include <iostream.h>

float sphere (float);
int main ()
{
    int a=0;
    cout <<"Enter The Radius Of The Sphere : ";
    cin >> a;
    cout <<"\n\nRadius of sphere is " << sphere(a);
    return 0;
}
float sphere (float x)
{
    x=4*3.14*(x*x);
    return x;
}