0
What's wrong in this?
public class Program { public static void main(String[] args) { int r,cir,area; r=7; cir=22/7*r; area=22/7*r^2; System.out.println("The circumference is "+cir); System.out.println("The area is "+area); } }
2 Answers
+ 1
*area and cir should be float
*replace 22 by 22.0 or declare r as float
* ^ stands for xor .use pow function from math
0
Thanks



