Computer Science, asked by singhrajendry, 1 day ago

pls help me to solve this question it's emergency I nedd it before 8 o clock​

Attachments:

Answers

Answered by mdazada9312
0

Answer:

I think this is you paper

Answered by qwsuccess
0

The Answers of the following questions are as follows,

  • Question-1:

public class Main  

{  

  public static void main (float p,float r,float t)  

   {  

       float p, r,  t,  si, ci, ci_amount;

              si  = (p*r*t)/100;  

              ci_amount = p * Math.pow((1+(r/100)),t);

               ci = ci_amount - p;

             System.out.println("Simple Interest is: " +si);

             System.out.println("Compunt Interest is: " +ci);

             System.out.println("Difference between si and ci: " +(ci-si));

             

   }

}

  • Question-2:

public class Main  

{  

  public static void main (int a, int b, int c)  

   {  

           double discriminant= (b*b)-(4*a*c);

           int d = (int) Math.rint(discriminant);

             System.out.println("Discriminant: " +d);

   }

}

  • Question-3:

public class Main  

{  

  public static void main (String args[])  

   {  

          int l=80,w=50,b=5;

          int ls=l-(2*b);

          int ws=w-(2*b);

          float area=ls*ws;

          System.out.println("Area of screen= "+area);

   }

}  

  • Question-4:

public class Main  

{  

  public static void main (int n, int ng)  

   {  

          int nb=n-ng;

          float nbp=(nb/n)*100.0;

          float ngp=(ng/n)*100.0;

          System.out.println("Percentage of girls= "+ngp);

          System.out.println("Percentage of boys= "+nbp);

   }

}

  • Question-5:

public class Main  

{  

  public static void main (float dig)  

   {  

          float area=(dig*dig*0.5);

          float perimeter=4*(Math.sqrt(area));

          System.out.println("Area= "+area);

          System.out.println("Perimeter= "+perimeter);

   }

}  

Similar questions