- Just focusing on quantitative aptitude questions to help freshers who are facing these questions in interviews and written test.
- No need to allocate different time slot to prepare quantitative aptitude questions. We will help you to cover those formulas and provide problems with solutions as a java programs.
- Hope it will help you.
- Cost Price: The price, at which an product is purchased (CP).
- Marked price: actual price or label price which shown on product.(MRP)
- Selling price: The product sold price.(SP)
- Profit: If selling_price is greater than cost_price then its a profit.(selling_price-cost_price)
- Loss: if selling_price is less than cost_price then its a Loss.(cost_price-selling_price)
- Discount: marked_price-selling_price.
- discount_percentage=((marked_price-selling_price)/marked_price)*100;
- profit=selling_price-cost_price;
- if(selling_price>cost_price)
- profit_percentage=((selling_price-cost_price)/cost_price)*100;
- if(selling_price<cost_price)
- loss_percentage=((cost_price-selling_price)/cost_price)*100;
Problem 1#: If a product is bought for Rs.100. and sold for Rs.150 what is the profit percentage
- package com.javaQuantitaveQuestions;
- /**
- * Quantitative aptitude questions
- * @author www.instanceofjava.com*/
- public class ProfitNLoss {
- public static void main(String[] args) {
- double profit,profit_percentage=0;
- double cost_price=100;
- double selling_price=150;
- if(selling_price>cost_price){
- profit_percentage=((selling_price-cost_price)/cost_price)*100;
- profit=selling_price-cost_price;
- System.out.println("Profit:="+profit+"\n profit Percentage:="+profit_percentage+"%");
- }
- }
- }
Output:
- Profit:=50.0
- profit Percentage:=50.0%
- package com.javaQuantitaveQuestions;
- /**
- * Quantitative aptitude questions
- * @author www.instanceofjava.com
- */
- public class ProfitNLoss {
- public static void main(String[] args) {
- double loss=0,loss_percentage=0;
- double cost_price=100;
- double selling_price=70;
- if(selling_price<cost_price){
- loss=cost_price-selling_price;
- loss_percentage=((cost_price-selling_price)/cost_price)*100;
- System.out.println("Loss:="+loss+"\nLoss Percentage:="+loss_percentage+"%");
- }
- }
- }
Output:
- Profit:=50.0
- profit Percentage:=50.0%
Problem 3#: If a product is bought for Rs.100. and sold for Rs.70 what is the Discount and Discount percentage
- package com.javaQuantitaveQuestions;
- /**
- * Quantitative aptitude questions
- * @author www.instanceofjava.com
- */
- public class ProfitNLoss {
- public static void main(String[] args) {
- double discount=0,discount_percentage=0;
- double marked_price=100;
- double selling_price=70;
- discount=(marked_price-selling_price);
- discount_percentage=(discount/marked_price)*100;
- System.out.println("Discount:="+discount+"\ndiscount
- Percentage:="+Discount_percentage+"%");
- }
- }
Output:
- Discount:=30.0
- Discount Percentage:=30.0%
No comments