Please write the program. Urgent for project
Answers
X=eval(input("Enter Amount:"))
d=0
if X>=0:
if X>=2000:
d=(5/100)*X
print("calculator")
elif X>=2001 and X<=5000:
d=(10/100)*X
print("school bag")
elif X>=5001 and X<=10000:
d=(15/100)*X
print("wall clock")
elif X>=10001:
d=(20/100)*X
print("wrist watch")
else:
print("Wrong Input")
print("Discount",d)
_____________________
Hope it helps you
This is a python program.
Pls mark me brainliest
Answer:
import java.util.*;
public class Cloth
{
public static void main ( String args[ ] )
{
Scanner sc = new Scanner (System.in);
double dis, amt; String gift;
System.out.println ("Enter the total cost");
int cost = sc.nextInt( );
if (cost <= 2000)
{
dis = 5.0/100.0 * cost ;
amt = cost - dis ;
gift = Calculator ;
}
else if (cost > 2000 && cost <= 5000)
{
dis = 10.0/100.0 * cost ;
amt = cost - dis ;
gift = School bag ;
}
else if (cost > 5000 && cost <= 10000)
{
dis = 15.0/100.0 * cost ;
amt = cost - dis ;
gift = Wall Clock ;
}
else
{
dis = 20.0/100.0 * cost ;
amt = cost - dis ;
gift = Wrist Watch ;
}
System.out.println ("Amount to be paid =" +amt );
System.out.println (" Gift = " +gift );
}
}
Please mark my answer as brainliest if it is helpful for you...