PDA

View Full Version : i used if statment to stop the program and prompt the error when area of inner circle



sana.pari
04-24-2011, 06:42 PM
Subject: Sir i have solved my problem myself. plz check my programme
I have solved my problem myself sir. i used if statment to stop the program and prompt the error when area of inner circle is greater or equal to area of outer circle. this is my code: #include double circleArea(double); main() { double rad1; double rad2; double ringArea; cout<<"Type the area of the outer circle="; cin>>rad1; cout<<"Type the area of the inner circle="; cin>>rad2; if(rad2<<"The Area of the ring is="<<<"Error! Radius of inner circle cannot be greater or equal to the radius of outer circle"<