Write a program in Java were a customer in big bazaar to purchase a T.V and fridge on purchasing above 25000 he get a discount of 20 present and below,he gets 10 present discount.
Answers
Answered by
1
import java.util.Scanner;
public class program{
public static void main(String...args){
Scanner sc=new Scanner(System.in);
int purchase=sc.nextInt(); // enter no.
int discount; // discount get on purchase:
if(purchase>0)
{
if(purchase<25000){
System.out.println("you got discount of 10% on the purchase of: "+purchase+" rs");
}
else{
System.out.println("you got discount of 20% on the purchase of: "+purchase+" rs");
}
}
else{
System.out.println("sorry invalid purchase: "+purchase+" rs");
}
}
}
public class program{
public static void main(String...args){
Scanner sc=new Scanner(System.in);
int purchase=sc.nextInt(); // enter no.
int discount; // discount get on purchase:
if(purchase>0)
{
if(purchase<25000){
System.out.println("you got discount of 10% on the purchase of: "+purchase+" rs");
}
else{
System.out.println("you got discount of 20% on the purchase of: "+purchase+" rs");
}
}
else{
System.out.println("sorry invalid purchase: "+purchase+" rs");
}
}
}
Similar questions