Computer Science, asked by SamparnaRoutray, 9 months ago

WAP to enter cost price of an article. Allow a discount of 8%

and print the final price to be paid in java​

Answers

Answered by darkghost486
1

Explanation:

import java.util.Scanner;

class dis

{

public static void main(String arts[])

{

Scanner sc=new Scanner(System.in);

System.out.println("Enter the Cost price of the article");

double cp=sc.nextDouble();

double dis=8/100*cp; //*variable to calculate discount

double price=cp-dis;

System out.println("Final price to pe baid="+price);

}

}

Similar questions