top of page
Search

1




import java.io.*;

/**
 * Write a description of class prog4 here.
 *
 * @author (your name)
 * @version (a version number or a date)
 */
public class prog4
{
    public static void main (String args[])throws IOException
    {
        InputStreamReader read=new InputStreamReader(System.in);
        BufferedReader in=new BufferedReader(read);
        int sal;
        double pf,rsal,ed,ren;
        System.out.println("Enter salary");
        sal=Integer.parseInt(in.readLine());
        pf=sal*12.0/100.0;
        rsal=sal-pf;
        ed=rsal*20/100.0;
        ren=rsal*10/100.0;
        System.out.println("Amount of contribute PF : "+pf);
        System.out.println("Amount spent in education : "+ed);
        System.out.println("Amount spent on rent : "+ren);
    }
}


 


9 views0 comments
bottom of page