محمد255
دوشنبه 05 تیر 1391, 20:30 عصر
سلام
من فاکتوریل رو معمولی با C# اینطوری مینویسم:
Class Program
Public int fact (int n
int result
if (n==1) return 1
result = fact*(fact-n)*n
static void main
int no
factorial obj=new factorial
no = convert.to int 32 (console.readline
console.writeline (obj.fact(no
حالا میخواستم ببینم با Interface همین برنامه رو چطوری میشه نوشت؟
خیلی ممنونم.
من فاکتوریل رو معمولی با C# اینطوری مینویسم:
Class Program
Public int fact (int n
int result
if (n==1) return 1
result = fact*(fact-n)*n
static void main
int no
factorial obj=new factorial
no = convert.to int 32 (console.readline
console.writeline (obj.fact(no
حالا میخواستم ببینم با Interface همین برنامه رو چطوری میشه نوشت؟
خیلی ممنونم.