Jump to content

780blzit

Member
  • Posts

    189
  • Joined

  • Last visited

Everything posted by 780blzit

  1. 780blzit

    C# help!

    aaalright, that seems to somewhat do it. Honestly, I'm so confused right now with my own code I don't know what I'm doing anymore haha.. I'm going to bed soon but if you want to download it and have a look at it yourself you can: https://www.dropbox.com/s/0kgfzxve809rs6z/glos%C3%B6vning123.rar?dl=0 Not sure if I'm allowed to post links or not but ohwell, thank you so much for your help anyways!
  2. 780blzit

    C# help!

    if (svar[k] == rätt[k] && k < 19) s++;
  3. 780blzit

    C# help!

    It's showing me svar[19] and rätt[19] ?
  4. 780blzit

    C# help!

    I'm sorry, I'm quite new to C# sooooo.. I thought your answers were the same? I still do have a problem, and you told me to run it in debug mode. Which I did, I don't know where you get to see the values of the variables? Sorry, english is obviously not my mother language.
  5. 780blzit

    C# help!

    ooh my bad! I definitely meant svar[k] with rätt[k]!! Sorry!
  6. 780blzit

    C# help!

    I tried it but it doesn't work.
  7. 780blzit

    C# help!

    I'm trying to make a small program where you enter the correct word for the definition that is displayed. Example: "Statement of the meaning of a term." answer: Definition Now I've sorted the correct definitions in an array, and I've sorted the answers that the user put in in another array. <pre class="_prettyXprint _linenums:0">using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace Glosövning{ public partial class Form1 : Form { static string[] gloser = new string[19]; static string[] svar = new string[19]; static string[] rätt = new string[19]; static int k = 0; static int s = 0; public Form1() { InitializeComponent(); gloser[0] = "Öka med 1, 'i++' till exempel."; gloser[1] = "Minska med 1, 'i--' till exempel."; gloser[2] = "Reservera minne."; gloser[3] = "Ge variabler ett värde.\n'i = 5' till exempel."; gloser[4] = "Används för att kombinera\nflera olika villkor."; gloser[5] = "Större än, mindre än.\n <, >, <=, >= till exmepel."; gloser[6] = "Tillfälligtvis gör\nom en datatyp till en annan."; gloser[7] = "Vilken sorts information det är,\nint för heltal, double för decimaltal."; gloser[8] = "För stora program lätta att överblicka.\nGörs för att slippa upprepa sig själv."; gloser[9] = "Används för att hoppa in i\ntexten eller för att få raka kolumner."; gloser[10] = "En parantes i en parantes,\nloop i en loop."; gloser[11] = "Överlagrade metoder,\nflera metoder med samma namn."; gloser[12] = "Lägger ihop stränger/text."; gloser[13] = "Källkod görs om till\nmaskinkod som datorn kan exekvera."; gloser[14] = "Ställer upp koden på\nett snyggt sätt så det\nblir lättare att se."; gloser[15] = "Annat ord för upprepning,\nt.ex. upprepa loopar."; gloser[16] = "När något uppropar sig\nsjälv. T.ex. en metod."; gloser[17] = "Struntar i decimaler, avrundar"; gloser[18] = "Restvärde ur en heltalsdivision"; rätt[0] = "inkremera"; rätt[1] = "dekremera"; rätt[2] = "allokera"; rätt[3] = "tilldela"; rätt[4] = "logiska operatorer"; rätt[5] = "villkors operatorer"; rätt[6] = "typomvandling"; rätt[7] = "datatyp"; rätt[8] = "metod"; rätt[9] = "escapetecken"; rätt[10] = "nästlad"; rätt[11] = "polymorphism"; rätt[12] = "konkatenera"; rätt[13] = "kompilera"; rätt[14] = "indentera"; rätt[15] = "iteration"; rätt[16] = "rekursion"; rätt[17] = "trunkera"; rätt[18] = "modulus"; } private void button1_Click(object sender, EventArgs e) { beginning: if (k > 0 && k < 19) { textBox1.Text = svar[k]; } if (k >= 0 && k < 19) { label2.Text = gloser[k];; } k++; if (k <= 19) { label3.Text = k + "/19"; button1.Text = "Nästa"; } if (k == 19) button1.Text = "Resultat"; if (k == 20) { label2.Text = "Du hade " + s + " antal rätt."; button1.Text = "Börja om"; } if (k == 21) { Array.Clear(svar, 0, 19); k = 0; goto beginning; } } private void textBox1_TextChanged(object sender, EventArgs e) { } private void label2_Click(object sender, EventArgs e) { } private void label3_Click(object sender, EventArgs e) { } private void label4_Click(object sender, EventArgs e) { } }} </pre> I want to compare the answers with the correct definitions. I've tried: "if(svar[k] == rätt[0]) s++;"
  8. http://www.bestbuy.com/site/ibuypower-desktop-intel-core-i7-16gb-memory-1tb-hard-drive-120gb-solid-state-drive-white/4757124.p?id=1219638967524&skuId=4757124 why not get this one instead?
  9. Hello, I'm currently shopping for a new HDD and a new SSD. Right now, I'm deciding between: Seagate Desktop SSHD 2TB & WD Black 2TB. The Seagate one is $50 cheaper. SSD: OCZ Trion 100 240GB and HyperX Fury 240GB. Somewhat similar speeds, HyperX is about $15 more expensive. Should I put another $35 down and get the Samsung one? What are your opinions? Thank you!
  10. Hellooo, my homework is to write the multiplication table 1-12 using two loops. Which wasn't a problem, but making it look nice is. What I've got so far is: //Färg Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.Gray; Console.Clear(); //Loop&Utskrivning int m = 0; for (int i = 1; i <= 12; i++) { for (int t = 1; t <= 12; t++) { m = i * t Console.WriteLine(m); } } What I want, is for the multiplication table for every number 1-2 to be in their own column. Basically: 1 2 3 4 5 2 4 6 8 10 and so on. Thank you!
  11. could you like. uhm.. buy a couple and then ship them to sweden? Thank you. I'll pay $50USD for each hdd and ill pay shipping. kthxbye.
  12. I went from the iPhone 5 to the Edge+ and I must say at first I was overwhelmed by the size of the Edge+. Was my first time using an android phone and I must say I love the OS. Unfortunately the theme is buttugly on samsung devices, but luckily you can change that and then it's fine. So far, I'm very satisfied with my Edge+. I'd say go with what feels right.
  13. Aah, I'll look up how a compression jet engine works and looks like! Thank you! How about.. No computer related item? Sorry..
  14. I don't even know what that is..
  15. Thank you! I would like some moving parts, an engine would be great but way to complicated for me. I'm not sure if you read the whole post or I just suck at english, but I've already made the thing in the gif before, in SolidWorks. I'm looking for something new to do. I would like something with moving parts, like an engine for example.
  16. So I'll be starting a project in CAD soon. But I'm all out of ideas. Last year I saw this on reddit: And from this gif, I made one like this but in my own way. Does anyone have any ideas on what I could make? It wont be 3D printed or anything. Thank you!
  17. The normal S6 has normal wireless charging, the Edge+ plus has fast/quick- wireless charging. I don't know how much faster, but still.
  18. Unfortunately there's no S6+, I do want a bigger screen. What about that wireless quickcharging though?
  19. Too bad I'm in Europe, and too bad the note 5 is way more expensive if I want to get it here. I do like the look and features of near stock android, but the on-screen buttons really turns me off. So you would go with the normal S6 instead of the edge+? I'm in Europe so I can't get the Note 5.
  20. So I've had my iPhone 5 for a bit longer than 2 years now and the battery life is getting pretty shit. Also I'm quite tired of iOS. What do you think? Should I switch? if yes, to s6 edge+ or something else? Thank you!
  21. So I've been using Iphones for a long time now and I'm soon about to get the Galaxy S6 Edge+, first time owning an android phone in a long time. Can't remember the last time I did. So is there anything I should know or be prepared for?? Is a Gmail account needed?
  22. Thank you! This works perfectly! Do you mind explaining what it means? Or what int.Parse does?
  23. Hey, so I just had my first lesson in Programming, which is in C# .Net framework. aaand I got homework, now it wasn't difficult at all. Until I got to question 3. This what I've got so far: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace läxa3{ class Program { static void Main(string[] args) { Console.WriteLine("Enter a value:"); int värde = Console.Read(); int värde2 = (värde * 1000); Console.WriteLine("You wrote: " + värde + "km"); Console.WriteLine("That is: " + värde2 + "meter"); Console.ReadKey(); } }} It gives me no error what so ever when I run it, but it spits out the wrong number to me. Any help will be greatly appreciated!
  24. Just saving up from the money I get from going to school. Which is about ~$120 a month.
×