+ 2

code couch

Can I insert one my solution here and ask what's wrong with my code? why not accepted while everything is correct and works.

5th Jun 2020, 8:48 AM
hamid
hamid - avatar
10 Answers
+ 2
Yes, people will help you with anything as long as you show your work
5th Jun 2020, 8:49 AM
Jay W
+ 2
here this is my code import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int color = sc.nextInt(); int base = 40; do{ System.out.println(((color*5) + base) + ((color*5 + base)/10)); sc.close(); } while( color < color); } }
5th Jun 2020, 8:51 AM
hamid
hamid - avatar
+ 2
it works the way the system want not accepted in test case 3 and 4
5th Jun 2020, 8:58 AM
hamid
hamid - avatar
+ 2
no paint costs
5th Jun 2020, 8:59 AM
hamid
hamid - avatar
+ 2
thanks anyway
5th Jun 2020, 9:02 AM
hamid
hamid - avatar
+ 2
I FOUND THE ANSWER THANKS EVERYBODY 👍👍
5th Jun 2020, 9:08 AM
hamid
hamid - avatar
+ 1
Is this the hex color problem?
5th Jun 2020, 8:58 AM
Jay W
+ 1
I cannot see the problem requirements as it is PRO but you can search for answers on the search bar for the hex color problem.
5th Jun 2020, 9:01 AM
Jay W
+ 1
YW, Happy to hear that.
5th Jun 2020, 9:09 AM
Jay W