- 1

I have make a java program which have input but sololearn do not take input

class rectangle { public static void main(int a, int b) { int ar=0,pr=0; System.out.println(" Entered values are :"+ a +"and"+ b ); ar=a*b; pr=2*(a+b); System.out.println(" Area of a rectangle = +ar"); System.out.println(" Perimeter of a rectangle=" +pr); } }

2nd Jan 2022, 3:18 AM
Srajan Kushwaha
3 Answers
+ 1
Srajan Kushwaha Do you think your main method is right? Scanner class is use to take input.
2nd Jan 2022, 3:21 AM
AÍąJ
AÍąJ - avatar
0
Ok
2nd Jan 2022, 3:22 AM
Srajan Kushwaha