I feel like I approached this the most basic way possible. Is there a better way I could have approached this?
public static void main(String[] args) {
//write your code here
int a = 1;
int b = 2;
int c = 3;
int d = 4;
int e = 5;
int f = 6;
int g = 7;
int h = 8;
int i = 9;
int j = 10;
int s = (a*b*c*d*e*f*g*h*i*j);
System.out.println(s);
}
How could i have made this code better?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
25 May 2019, 21:43
I wouldn't worry about that too much at this time. There are plenty of different ways to solve this, but just solving it is good enough. You will learn new techniques as you progress and shouldn't worry about what you don't know right now.
+1