Aim:
To write a program in C# to perform conversion of dollars to rupees.Algorithm:
ALGORITHM FOR COMPONENT.
Step 1: Create a namespace as currwithcomp.
Step 2: Create a class called currency as public.
Step 3: Inside the class declare the private variables x of type integer.
Step 4: Define a property variables x.
Step 5: In the property we have the get and set method.
Step 6: Get method is used to get the value form the user and set is used for
setting the user value to the original variables.
Step 7: Define a method called doll() as public.
Step 7.1: Return the value of x * 46.
Step 7.2: End of the method.
Step 8: End of the component.AGORITHM FOR MAIN.
Step 1: Create a class called curr.
Step 2: Define the main function.
Step 2.1: Create an object ob for currency.
Step 2.2 : Get the value of x using Console.Readline() method.
Step 2.3: Print the converted value using Console.Writeline() method.
Step 2.4: End of the main.
Program:
COMPONENT