Home › Forums › C Programming › invalid operands of types `float’ and `int’ to bin › Reply To: invalid operands of types `float’ and `int’ to bin
October 29, 2007 at 10:33 am
#3261
S.Thananchayan
Participant
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <iostream><br /> using namespace std;<br /> int main()<br /> {<br /> float pi = 3.14;<br /> int r;<br /> double area;<br /> cout << "Enter the radius: ";<br /> cin >> r;<br /> area = r * r * pi;<br /> cout << "The area is " << area << "n";<br /> return(0);<br /> <br /> } </iostream> |