Computer Science, asked by Anonymous, 1 year ago

how to do Java in the above question​

Attachments:

Answers

Answered by neelbhatkar3
1

import java.util.*;

public class sum

{

public static void main(String args[])

{

Scanner sc=new Scanner(System.in);

double bill;

System.out.println("enter the total amount of bill");

bill=sc.nextDouble();

if(bill>5000)

{

bill=bill-(bill*20/100);

System.out.println("The bill after getting 20% dicount:"+bill);

}

else

System.out.println("No discount on bill less than Rs.5000, therefore bill:"+bill);

}

}


Similar questions