public Stock(String Stock_Name,String Stock_Symb,Double x,Double y)
this.stock_name=Stock_Name;
this.stock_symb=Stock_Symb;
public int getChangePercentage()
int result=Convert.ToInt32(p);
int result=Convert.ToInt32(p);
public static void Main()
Console.WriteLine("\n Enter The Stock Name");
String x=Console.ReadLine();
Console.WriteLine("\n Enter The Stock Symbol");
String y=Console.ReadLine();
Console.WriteLine("\n Enter The Previous Stock Price");
String z=Console.ReadLine();
double a=Convert.ToDouble(z);
Console.WriteLine("\n Enter The Current Stock Price");
String k=Console.ReadLine();
double b=Convert.ToDouble(k);
Stock stk1=new Stock(x,y,a,b);
int v=stk1.getChangePercentage();