I still fail test case 2 and 4 in Kaleidoscope.why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I still fail test case 2 and 4 in Kaleidoscope.why?

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int nos=sc.nextInt(); int co=(nos*5); double pro=(co-(co*0.1)); double res=(pro+(pro*0.07)); double res1=(co+(co*0.07)); if(nos>1) System.out.println(res); else System.out.println(res1); } }

23rd Nov 2022, 1:40 PM
Killiam Chances
Killiam Chances - avatar
1 Answer
+ 3
Task is required to output result in "rounded-up" to 2 decimal places also...
23rd Nov 2022, 2:00 PM
Jayakrishna 🇮🇳