+ 1

Java program to calculate square of a number......need help with that please

Write a simple program to calculate the square of a number when it is imputed must accept multiples of 2

30th Oct 2018, 10:44 PM
Paul Dey
Paul Dey - avatar
9 Answers
+ 2
Have you tried it yourself ? Could you please post your attempt ?
30th Oct 2018, 11:11 PM
Uni
Uni - avatar
+ 1
kk
30th Oct 2018, 11:12 PM
Paul Dey
Paul Dey - avatar
+ 1
Yup Paul Dey I suppose that code won't work... ok first of all, ask yourself, what is the meaning of int x {2,6,8,10,12}...
30th Oct 2018, 11:27 PM
Uni
Uni - avatar
30th Oct 2018, 11:32 PM
Uni
Uni - avatar
+ 1
You're welcome 👍👍
30th Oct 2018, 11:33 PM
Uni
Uni - avatar
0
public class Program { public static void main(String[] args) { int x {2, 6, 8, 10, 12} for{i=0, i<no. length, i++} } }
30th Oct 2018, 11:25 PM
Paul Dey
Paul Dey - avatar
0
getting confused
30th Oct 2018, 11:26 PM
Paul Dey
Paul Dey - avatar
0
thus an array
30th Oct 2018, 11:29 PM
Paul Dey
Paul Dey - avatar
0
thanks a lot
30th Oct 2018, 11:33 PM
Paul Dey
Paul Dey - avatar