While purchasing certain items, a discount of 10% is offered by the popular super market if the quantity purchased is more than 1000.
Since number of people purchasing is increasing day by day the owner of the super market feels that the discount calculation will be better if there is a automated software that gives the total expenses If the quantity and price per item are input.
Input:
Integers representing quantity and price respectively.
Output:
Print the total expenses of the purchased items.
#include <stdio.h> int main() { int price,quantity,totexp; scanf("%d %d",&price,&quantity); if(price>1000) totexp=((price*quantity)-(0.1*price*quantity)); else totexp=price*quantity; printf("%d",totexp); return 0; }
INPUT_1:
1550 827
OUTPUT:
1153665
INPUT_2:
759 235
OUTPUT:
178365
Morae! Q
- Find a triplet such that triplet is minimum of all the triplets.
- Rearrange characters in a string such that no two adjacent are same.
- Return the coordinates of all cells in matrix sorted by their distance.
- Function to verify the ISBN number from the book.
- Find out the absolute difference of values of two array integers.
- Rotate the array in the right direction by K steps.
- Find the sequence of moves that wins the game, collect exactly G coins!.
- Calculate the sum of boundary elements of a matrix.
- Find the total number of ways to reach the tree house.
- Compute profit and loss of a product.
- Find the total expense of purchased items.
- Determine the maximum sequence weight.
- Find the person’s birth year is a leap year or not.
- Find the inner rating with the displayed rating.
- Find if angles are valid to form a triangle.
- Find out the winner of the game from the given statistics.
- Verify the tag to determine if one needs to arrest or allow the vehicle.
- Find the largest hexadecimal number.
- Group up all anagrams together from given words.
- Return all anagrams from the given words.