Musketeer's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 4 (0.01 per day)
- Joined:
- 14-December 11
- Profile Views:
- 300
- Last Active:
Jul 25 2012 04:44 AM- Currently:
- Offline
Previous Fields
- Country:
- IR
- OS Preference:
- Linux
- Favorite Browser:
- FireFox
- Favorite Processor:
- AMD
- Favorite Gaming Platform:
- PC
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: C# - Log in to Website Programmatically
Posted 22 Jul 2012
Hi guys.
Indeed the best tutorial I could find about this topic.
I still have a problem though, the website I'm trying ( http://s2.kingsera.org/ ) doesn't return anything like the "authentication token". So what am I supposed to do in this case?
Thanks in advance -
In Topic: Seeking for help with 8 queens problem
Posted 17 Dec 2011
Thanks tlhIn`toq
I figured out my mistake! in line 47 count should be changed to count1 and it'll work! -
In Topic: Seeking for help with 8 queens problem
Posted 17 Dec 2011
sry I forgot to put the code between code tags. This is the code above:
using System; class EightQueen{ static int count = 0; static void Main(){ int[,] A = new int[8, 8]; for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) A[i, j] = 0; Queen(A, 0, 0); Console.WriteLine("Total Solutions {0}", count); Console.ReadKey(); } static void Queen(int[,] A, int row, int col){ for (int i = row; i < 8; i++) for (int j = 0; j < 8; j++) if (Check(A, i, j)){ A[i, j] = 1; CountF(A); Queen(A, i + 1, j + 1); A[i, j] = 0; } } static bool Check(int[,] A, int x, int y){ int i; for (i = 0; i < 8; i++) if (A[x,i] == 1 || A[i,y] == 1) return false; for (i = 0; i < 8; i++) for (int j = 0; j < 8; j++) if (Abs(i-x) == Abs(j-y)) if(A[i,j] == 1) return false; return true; } static int Abs(int X){ if (X >= 0) return X; else return -X; } static void CountF(int[,] A){ int count1 = 0; for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) if (A[i, j] == 1) count1++; if (count >= 8) count++; } }
My Information
- Member Title:
- New D.I.C Head
- Age:
- 25 years old
- Birthday:
- May 17, 1988
- Gender:
-
- Location:
- Iran
- Interests:
- AD&D, Music
Contact Information
- E-mail:
- Private
- Yahoo:
-
musketeer1988
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
Musketeer has no profile comments yet. Why not say hello?