Phoenix no 23... still in its prime
- Matt Vinyl
- Senior Member
- Posts: 7198
- Joined: Wed May 11, 2005 6:56 pm
- Location: Lost in the outback, Bryan
Right, thats a massive clue!
That means its got to be either Denmark, Sweden, Finland, or Iceland. Out of that lot, Denmark is screaming at me for being the most Viking style invading nation like Norway. Failing that, i'll do Cardinals trick and say it could be any of the others
Matt
That means its got to be either Denmark, Sweden, Finland, or Iceland. Out of that lot, Denmark is screaming at me for being the most Viking style invading nation like Norway. Failing that, i'll do Cardinals trick and say it could be any of the others
Matt
"Sixty percent of the time, it works, every time!"
-
- Senior Member
- Posts: 4166
- Joined: Wed Jul 20, 2005 3:33 pm
Just in case it's not one of them...
Afghanistan
- Albania
- Algeria
- Andorra
- Angola
- Anguilla
- Argentina
- Armenia
- Australia
- Austria
- Azerbajan
- Bahrain
- Bangla Desh
- Barbados
- Belarus
- Belgium
- Belize
- Benin
- Bermuda
- Bolivia
- Bosnia and Herzegovina
- Botswana
- Brazil
- Brunei Darussalam
- Bulgaria
- Burkina Faso
- Burundi
- Cameroon
- Canada
- Chile
- China
- Colombia
- Costa Rica
- Cuba
- Cyprus
- Czech Republic
- Democratic Republic Congo (Zaïre)
- Dominican Republic
- East Timor
- Ecuador
- Egypt
- El Salvador
- England
- Eritrea
- Estonia
- Ethiopia
- Faroe Islands
- Fiji
- France
- Gambia
- Georgia (Sakartvelo)
- Germany
- Ghana
- Greece
- Greenland - Kalaallit Nunaat
- Grenada
- Guam
- Guatemala
- Guernsey
- Guyana
- Honduras
- Hong Kong
- Hrvatska (Croatia)
- Hungary
- Iceland
- India
- Indonesia
- Iran
- Ireland
- Israel
- Italy
- Jamaica
- Japan
- Jordan
- Kazakhstan
- Kenya
- Korea Republic
- Kosovo
- Kuwait
- Kurdistan
- Kyrgyzstan
- Latvia
- Lebanon
- Lesotho
- Liechtenstein
- Lithuania
- Luxembourg
- Macau
- Macedonia
- Malawi
- Malaysia
- Malta
- Marshall Islands
- Mauritius
- Mexico
- Micronesia
- Moldova
- Monaco
- Mongolia
- Morocco
- Mozambique
- Namibia
- Nepal
- Netherlands
- Netherlands Antilles
- New Caledonia
- New Zealand (Aotearoa)
- Nicaragua
- Nigeria
- Niue
- Norfolk Island
- Northern Ireland
- Northern Mariana Islands
- Oman
- Pakistan
- Palestina
- Panama
- Papua New Guinea
- Paraguay
- Peru
- Philippines
- Poland
- Portugal
- Puerto Rico
- Qatar
- Reunion
- Romania
- Russian Federation (AsianPart)
- Russian Federation (European Part)
- Saint Kitts and Nevis
- Saint Vincent and the Grenadines
- San Marino
- Saudi Arabia
- Scotland
- Singapore
- Slovakia
- Slovenia
- Somalia
- South Africa
- Spain
- Sri Lanka
- Sudan
- Svalbard and Jan Mayen
- Switzerland
- Syrian Arab Republic
- Taiwan
- Tanzania
- Thailand
- Tibet
- Tonga
- Trinidad and Tobago
- Tunisia
- Turkey
- Turks and Caicos Islands
- Ukraine
- United Arab Emirates
- United Kingdom
- Uruguay
- USA
- Vatican City State - Holy See
- Venezuela
- Viet Nam
- Virgin Islands (British)
- Virgin Islands (U.S.)
- Wales
- Yemen
- Yugoslavia
- Zambia
- Zimbabwe
Am I right???
Afghanistan
- Albania
- Algeria
- Andorra
- Angola
- Anguilla
- Argentina
- Armenia
- Australia
- Austria
- Azerbajan
- Bahrain
- Bangla Desh
- Barbados
- Belarus
- Belgium
- Belize
- Benin
- Bermuda
- Bolivia
- Bosnia and Herzegovina
- Botswana
- Brazil
- Brunei Darussalam
- Bulgaria
- Burkina Faso
- Burundi
- Cameroon
- Canada
- Chile
- China
- Colombia
- Costa Rica
- Cuba
- Cyprus
- Czech Republic
- Democratic Republic Congo (Zaïre)
- Dominican Republic
- East Timor
- Ecuador
- Egypt
- El Salvador
- England
- Eritrea
- Estonia
- Ethiopia
- Faroe Islands
- Fiji
- France
- Gambia
- Georgia (Sakartvelo)
- Germany
- Ghana
- Greece
- Greenland - Kalaallit Nunaat
- Grenada
- Guam
- Guatemala
- Guernsey
- Guyana
- Honduras
- Hong Kong
- Hrvatska (Croatia)
- Hungary
- Iceland
- India
- Indonesia
- Iran
- Ireland
- Israel
- Italy
- Jamaica
- Japan
- Jordan
- Kazakhstan
- Kenya
- Korea Republic
- Kosovo
- Kuwait
- Kurdistan
- Kyrgyzstan
- Latvia
- Lebanon
- Lesotho
- Liechtenstein
- Lithuania
- Luxembourg
- Macau
- Macedonia
- Malawi
- Malaysia
- Malta
- Marshall Islands
- Mauritius
- Mexico
- Micronesia
- Moldova
- Monaco
- Mongolia
- Morocco
- Mozambique
- Namibia
- Nepal
- Netherlands
- Netherlands Antilles
- New Caledonia
- New Zealand (Aotearoa)
- Nicaragua
- Nigeria
- Niue
- Norfolk Island
- Northern Ireland
- Northern Mariana Islands
- Oman
- Pakistan
- Palestina
- Panama
- Papua New Guinea
- Paraguay
- Peru
- Philippines
- Poland
- Portugal
- Puerto Rico
- Qatar
- Reunion
- Romania
- Russian Federation (AsianPart)
- Russian Federation (European Part)
- Saint Kitts and Nevis
- Saint Vincent and the Grenadines
- San Marino
- Saudi Arabia
- Scotland
- Singapore
- Slovakia
- Slovenia
- Somalia
- South Africa
- Spain
- Sri Lanka
- Sudan
- Svalbard and Jan Mayen
- Switzerland
- Syrian Arab Republic
- Taiwan
- Tanzania
- Thailand
- Tibet
- Tonga
- Trinidad and Tobago
- Tunisia
- Turkey
- Turks and Caicos Islands
- Ukraine
- United Arab Emirates
- United Kingdom
- Uruguay
- USA
- Vatican City State - Holy See
- Venezuela
- Viet Nam
- Virgin Islands (British)
- Virgin Islands (U.S.)
- Wales
- Yemen
- Yugoslavia
- Zambia
- Zimbabwe
Am I right???
- Istenem
- Senior Member
- Posts: 5918
- Joined: Sat Apr 30, 2005 2:42 pm
- Location: the nation's capital
- Contact:
somehow HE didn't get it.
but Matty did
there is a hugely scholarly article about it here
http://en.wikipedia.org/wiki/Flag_of_denmark
your go Matty
but Matty did
there is a hugely scholarly article about it here
http://en.wikipedia.org/wiki/Flag_of_denmark
your go Matty
nobody ever wins on those things.
-
- Senior Member
- Posts: 4166
- Joined: Wed Jul 20, 2005 3:33 pm
- Matt Vinyl
- Senior Member
- Posts: 7198
- Joined: Wed May 11, 2005 6:56 pm
- Location: Lost in the outback, Bryan
-
- Senior Member
- Posts: 4166
- Joined: Wed Jul 20, 2005 3:33 pm
- Matt Vinyl
- Senior Member
- Posts: 7198
- Joined: Wed May 11, 2005 6:56 pm
- Location: Lost in the outback, Bryan
Heh - thought it had gone unnoticed by most!Just noticed your avatar Matt V,
Anyway, as I enjoy the odd bit of programming, from the following code, what would the value of 'x' be if the following was executed?:
For a=0 to 20
For b=0 to 10
x=x+(a*b)
Next
Next
x=?
A bit different, and not necessarily 'General Knowledge' but hey! Give it a go...
PS - No firing up any software to work this out, although you are entitled to use a calculator...
"And do you ever contradict yourself, Minister?" "Well, yes and no..."
-
- Senior Member
- Posts: 4166
- Joined: Wed Jul 20, 2005 3:33 pm
Nice (if slightly geeky) question!
The first inner loop would return 0, as it is multipled by a=0
The next inner loop would return 55, as it is multiplied by a=1
The next would return 110, as a=2 and so on...
So the answer is a multiple of 55.
And is basically (0*55)+(1*55)+(2*55) ... (20*55) which I think would be the same as 20! * 55 is 133,809,610,449,715,200,000.
Which doesn't look right. Ah. its not the factorial, you just had to add up the numbers 1..20 which will equal (furtive calculation)... 210
So 210 * 55 = 11,550
...
Is that right? And do I get any points for showing my working out?
The first inner loop would return 0, as it is multipled by a=0
The next inner loop would return 55, as it is multiplied by a=1
The next would return 110, as a=2 and so on...
So the answer is a multiple of 55.
And is basically (0*55)+(1*55)+(2*55) ... (20*55) which I think would be the same as 20! * 55 is 133,809,610,449,715,200,000.
Which doesn't look right. Ah. its not the factorial, you just had to add up the numbers 1..20 which will equal (furtive calculation)... 210
So 210 * 55 = 11,550
...
Is that right? And do I get any points for showing my working out?
- Matt Vinyl
- Senior Member
- Posts: 7198
- Joined: Wed May 11, 2005 6:56 pm
- Location: Lost in the outback, Bryan
Pfff, that's not geeky. THIS is geeky:
unsigned int a, b, x;
__asm
{
// x = 0;
mov dword ptr [x],0
// for(a = 0; a < 20; a++)
mov dword ptr [a], 0
jmp label_a
label_a_start:
mov eax, dword ptr [a]
add eax, 1
mov dword ptr [a], eax
label_a:
cmp dword ptr [a], 14h
jae label_a_end
// {
// for(b = 0; b < 10; b++)
mov dword ptr , 0
jmp label_b
label_b_start:
mov eax, dword ptr
add eax, 1
mov dword ptr , eax
label_b:
cmp dword ptr , 0Ah
jae label_b_end
// {
// x = x + (a * b);
mov eax, dword ptr [a]
imul eax, dword ptr
add eax, dword ptr [x]
mov dword ptr [x], eax
// }
jmp label_b_start
label_b_end:
// }
jmp label_a_start
label_a_end:
}
...and curiously enough, that's not the answer I get using both asm and c!
Edit: Ah, just realised. I'm no VB man, but I suspect that your "for a=0 to 20" is my "a = 0; a <= 20; a++", not "a < 20". That's why I get a different answer!
unsigned int a, b, x;
__asm
{
// x = 0;
mov dword ptr [x],0
// for(a = 0; a < 20; a++)
mov dword ptr [a], 0
jmp label_a
label_a_start:
mov eax, dword ptr [a]
add eax, 1
mov dword ptr [a], eax
label_a:
cmp dword ptr [a], 14h
jae label_a_end
// {
// for(b = 0; b < 10; b++)
mov dword ptr , 0
jmp label_b
label_b_start:
mov eax, dword ptr
add eax, 1
mov dword ptr , eax
label_b:
cmp dword ptr , 0Ah
jae label_b_end
// {
// x = x + (a * b);
mov eax, dword ptr [a]
imul eax, dword ptr
add eax, dword ptr [x]
mov dword ptr [x], eax
// }
jmp label_b_start
label_b_end:
// }
jmp label_a_start
label_a_end:
}
...and curiously enough, that's not the answer I get using both asm and c!
Edit: Ah, just realised. I'm no VB man, but I suspect that your "for a=0 to 20" is my "a = 0; a <= 20; a++", not "a < 20". That's why I get a different answer!