Need help!


Viking

Member
Joined
Nov 24, 2010
Messages
408
There is two tasks on my IT test I just can't figure out;


Create an Array wich contains the names of the month. Let the user write in the number


of one month in a txtbox, and the result would be that one month pops out in the label..


Create two dropdownlists, one with questions and one with answers. The answers should be in random order.


add a button wich gives you feedback in the label if it was wrong or right


HELP
 
Last edited by a moderator:
Anyone?


Help?


15 min left...
 
Last edited by a moderator:
char month={"none", "jan", "feb", "march"........};


print month[given_month];


wiki 'lookup table'


the none is needed as arrays start from zero
 
char month={"none", "jan", "feb", "march"........};


print month[given_month];


wiki 'lookup table'


the none is needed as arrays start from zero

Doesn't work


public partial class _Default : System.Web.UI.Page


{


int[] tallArr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };


char maaned = { "Ingen", "Januar", "Februar", "Mars", "April", "Mail", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember" };


protected void Page_Load(object sender, EventArgs e)


{


}


protected void btn1_Click(object sender, EventArgs e)


{


lblUtskrift.Text = "Det er " +
 
right, well that's the kind of approach you should go for, ignoring language specifics like it being in a really silly language


though the fact i put char month instead of string month probably doesn't help XD (or char* month[] would work too, though this is c# :p )
 
Does seem resonable now, but I only get "System string" when i Press the button


C#... u make no sence


well, a little


but not now


damn my 70 year old IT teacher!
 
Last edited by a moderator:
well the concept is correct, however it has to be done, simple really


the one with the lists you can work out, shouldn't be that difficult with some basic logic :)
 
Ok, I got it working!


But the dropdownlist task, fail


Buuut I'm looking at a B I think!


Thank you very much for the help (somewhat help, inspiration)! :D
 
Simple stuff like this makes me realise just how much stuff we seasoned programmers take for granted.


I still hold that stuff stuff cannot be taught. You're either a geek who stays up until Xam in the morning trying to write trojans in VB. Or you're not.


Yeah. My start to programming was pretty low rent ;) But it got me a job.
 
Simple stuff like this makes me realise just how much stuff we seasoned programmers take for granted.


I still hold that stuff stuff cannot be taught. You're either a geek who stays up until Xam in the morning trying to write trojans in VB. Or you're not.


Yeah. My start to programming was pretty low rent ;) But it got me a job.

I wish, I'm not the best in the buisiness, but I know few tricks :)


I'm more like the one creating a living hell for the IT on my school,


Changed every printers system language to russian, and turning back on the internet while we have a whole-day test :D


(No profit the last one, just enjoy watching my IT-teacher freak out)
 
Back
Top