Computer Science, asked by saketh6569, 10 months ago

a store charges ₹120 per item if you buy less than 10 items . if you buy between 10 and 99 items,the cost is ₹100 per items . if you buy 100 or more items ,the cost is ₹70. write a program that asks the user how many items there are buying and print the total cost

Answers

Answered by empathictruro
7

Answer:

Explanation:

Pseudocode for the program

int item, total;

printf("enter total no of items");

scanf("%d", &item);

if(item<10)

{

total=item*120;

}

if((item>=10) && (item<=99))

{

total=item*100;

}

if(item>=100)

{

total=item*70;

}

printf("total cost is%d", total)

Answered by sarkarchanchal200
19

Answer:

# in python

item=int(input("Enter total no of items: "))

if(item<10):

   total=item*120;

elif item>=10 and item<=99:

   total=item*100;

elif item>=100:

   total=item*70;

print("total cost : ", total)

Explanation:

output:

Enter total no of items: 50

total cost :  5000

Similar questions