Learn C++ beginer programs

July 5, 2009

Write a program to find area of a circle

Filed under: area,cin,cout — snehilkhanor @ 5:29 pm
Radius of circle is taken from user and Area is calculated

Select To use this code as it is.. select and copy paste this code into code.cpp file :)
  1. #include <iostream.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. float r,a;
  7. cout<<”enter radius “;
  8. cin>>r;
  9. a=3.14*r*r;
  10. cout<<”The area is “<<a;
  11. getch();
  12. }

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.