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.

Loops Practise(Area of circle)

Wednesday, May 18, 2011

#include <iostream.h>
int main ()
{
    float radius;
    float area;
    cout <<"Enter Radius (0 To Quit) = ";
    cin >> radius;
    cout <<endl;
    while (radius>0)
    {
        area=3.14*(radius*radius);
        cout <<"The Area Is = " << area <<endl;
        cout <<"\nEnter Radius (0 To Quit) = ";
        cin >> radius;
    } // end while
    return 0;

    }