Calculate area and circumference of the circle in C++ program.
#include<iostream.h> #include<conio.h> void main() { float r; clrscr(); cout<<"Enter a radius:-"; cin>>r; float area=22.0/7*r*r; float cm=2*22.0/7*r; cout<<"Area of circle="<<area; cout<<"\nCircumference of circle="<<cm; getch(); }
Output:-
0 Comments