0
How to make this one with input and output only?guys help please
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here for (int x =0;x <3; x++){ System.out.println (amount -= amount *0.1); } } }
1 Respuesta
+ 2
Take Printing statement out of loop.
edit: Vitalii Chornyi
for (int x =0;x <3; x++) {
amount -= amount *0.1); }
System.out.print(amount);