
a news paper boy purchase 100 papers every day.he purchases papers at Rs.1.50 and sells at Rs.2.00 at each.any unsold news papers,as scrap at a price of Rs.0.50. write a program to read the demand and evaluate his profit..using scanner

Hi Friend,
Try this:
import java.util.*;
class ScannerExample1
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter demand: ");
int demand=input.nextInt();
double cp=100*1.50;
double left=100-demand;
double e1=demand*2.00;
double e2=left*0.50;
double sp=e1+e2;
double profit=sp-cp;
System.out.println(profit);
}
}
Thanks