- 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); } }
3 Réponses
+ 1
Srajan Kushwaha
Do you think your main method is right?
Scanner class is use to take input.
0
Ok