Assignment of C#:-

1
Assignment of C#:-

1)  WAP to reverse three-digit number without using Loop

2)  WAP  to calculate electricity bill where unit price and total consumption will be entered by the user.

3)  WAP to create a salary calculator where basic, ta, da, comm,pf, and noofleave will be entered by the users.



using System;

class SalaryCalc
{
    public static void Main()
    {
          float basic=12000,ta=200,da=200,comm=300,pf=500,nl=2,asal=200;
          float tsal,gsal;
          gsal=basic+ta+da+comm;
          Console.WriteLine("Gross Salary Is {0}",gsal);
          tsal=gsal-(gsal/30)*nl-asal-pf;
          Console.WriteLine("Total Salary Is {0}",tsal);

    }

}
4)  WAP to calculate Area of Circle and Area of Triangle.  


Tags

Post a Comment

1Comments

POST Answer of Questions and ASK to Doubt

  1. using System;
    class reverse
    {
    public static void Main()
    {
    int a,b,c,d,rev;
    Console.WriteLine("enter three digit number");
    a=int.Parse(Console.ReadLine());
    b=a%10;
    c=(a/10)%10;
    d=(a/10)/10;
    rev=b*100+c*10+d;

    Console.WriteLine("result is{0}",+rev);
    }
    }

    ReplyDelete
Post a Comment