Q2: Display the following pattern on the text box of the Windows FORM in C# a) 11 22 33 44 55 66 77 88 99 60 61 62 63 64 65 66 67 68 69 70 71 b) 71 69 70 66 67 68 62 63 64 65 77 88 99 60 61 11 22 33 44 55 66 Hint: You can use two text boxes one for part A and part B separately.
int fact(int x)
ReplyDelete{
if(x<=1)
return(1);
else
return(x*fact(x-1));
}
What About 0
ReplyDeleteBy definition 0!=1 so you can modify the line if(x==1) to if(x==0||x==1)
Deletenice article for beginners.thank you.
ReplyDeletewelookups C++
javacodegeeks
Q2: Display the following pattern on the text box of the Windows FORM in C#
ReplyDeletea) 11 22 33 44 55 66
77 88 99 60 61
62 63 64 65
66 67 68
69 70
71
b) 71
69 70
66 67 68
62 63 64 65
77 88 99 60 61
11 22 33 44 55 66
Hint: You can use two text boxes one for part A and part B separately.