How do I multiply with only one given number? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do I multiply with only one given number?

For one of the projects I have to do, I have to multiply a var tow, which has no specified number, by var trucks, which =2. But I can't seem to figure it out

18th Sep 2021, 12:28 AM
zaenck.
1 Answer
+ 1
Scanner sc=new Scanner(System.in); int tow=sc.nextInt(); int truck=2; int product=truck*tow;
18th Sep 2021, 4:42 AM
Patel