3rd BUBT Intra-University Programming Problem J

Problem J
Problem Statement:
Kamal is the only son of Mr. Zamal. Kamal has recently completed his graduation, but he is very much relaxed to get a job. So, Mr. Zamal established a super store for him where Kamal can sell all the grocery, fashion, toiletries and garment items. Since, Kamal is careless about calculating profit and loss for all the sold products, Mr. Zamal requests you to write such a program which can find out  percentage of profit/loss for a sold product.
The first line denotes number of test case.  The second line contains a number X  (1<=N<=<32000) denotes purchase price of a product.  The third line contains number M  (1<=M<=<32000) denotes sold price of that specific product. 
Output contains according to the number of the test cases. Shows “Profit/loss: X%”, where X is the percentage of profit or loss.
Sample Input/Output:
Sample input
Sample output
Profit: 6.6%
Problem Setter: Md. Mijanur Rahman, Asst. Professor, Dept. of CSE
Bangladesh University of Business and Technology (BUBT)
At First you can try to solve this problem if you can’t than see this code & find what’s your problem . If you copy paste this code you could not improve yourself in programming .

Posted by Shipu Ahamed

Leave a Reply