Please help me with Kaleidoscopes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Please help me with Kaleidoscopes

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner sc = new Scanner (System.in); //Getting the input double buyed = sc.nextDouble (); //cost = buy * 5 double cost = buyed * 5; double tax = cost * 0.07 ; double total = cost + tax; //If buyed more than one if (buyed > 1) { double more = buyed - 1; double cost2 = more * 4.9 + 5; total = cost2 * 1.07; } System.out.println (total); } }

23rd Jun 2023, 3:37 PM
Hasara Pramuditha Herath
Hasara Pramuditha Herath - avatar
2 Answers
+ 5
Share your code
23rd Jun 2023, 3:44 PM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 5
Explain your question what type of help you need 😏
23rd Jun 2023, 4:21 PM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar