+ 2
Scanner
hi everyone, im trying to write a code, but something is wrong. can you help me? import java.util.Scanner; public class Tester { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x; x = scan.nextint(); long l; l = scan.nextLong(); int width, height, area, peri; width = 8; height = 5; area = width * height; peri = 2 * (width + height); System.out.println ("Area:" + area + " " + "Peri:" + peri); } }
2 Respuestas
+ 14
@luka long is a data type like int and double.
+ 3
Thank you Luka, I didn't pay attention that nextint must be with capital I. So thank's a lot.