Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
O

oliver_twistor

@oliver_twistor
About
Posts
8
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Translation needed
    O oliver_twistor

    Thanks, but I have already worked it out. It was only one small adjustment I had to do in my code to make it worked. I did it like this: Dim x As Integer Dim y As Integer Dim counter As Integer Dim check As Boolean Private Sub Bttn_Fkltt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bttn_Fkltt.Click x = TxtBx_Fkltt.Text counter = 1 check = False y = x * (x - 1) If x > 2 Then Do Until check = True counter = counter + 1 y = y * (x - counter) If counter = x - 1 Then check = True Exit Do End If Loop Lbl_Fkltt.Text = y Else Lbl_Fkltt.Text = y End If End Sub Look at the code: If counter = x - 1 Then. Before, I had If counter = x Then, and with that code, y was multiplied with 0 in the end, resulting in y = 0. //OT

    Visual Basic

  • Translation needed
    O oliver_twistor

    So there is a function to do n-factorial. I didn't know that. Well, I was hoping to find out how to write a for...while loop or something that does the same thing. I have spoken with my mathematics teacher and we are trying to find some algorithm to do n-factorial. I mean, a calculator doesn't know what, for example, "5!" is, does it? I tried to write a loop with "counter" that added "1" for every loop, and when "counter" had the same value as "n". It did not work, though. But thanks for the help, anyway. //OT

    Visual Basic

  • Translation needed
    O oliver_twistor

    I have tried to figure something out that I want to write in code, but I couldn't find the solution. Until now. I found the following piece of code on the Internet today. Unfortunately, it is in the language of C (I think so), a language that I don't know anything about. So, I would be very grateful if anyone could translate it to Visual Basic code. #include iostream.h //Fakultetsfunktion int fak(int n); void main() { int x=5; cout<< x << "!=" << endl; cout<< fak(x) << endl; cout<< 5*4*3*2*1 << endl; } //Rekursiv fakultetsfunktion int fak(int n) { if (n<=0) return 1; else { int a = n*fak( n-1 ); return (a); } } //OT

    Visual Basic

  • Requirements
    O oliver_twistor

    Thanks! What is MDAC? //OT

    Database csharp database business question

  • Requirements
    O oliver_twistor

    Is there any specific software one has to use to be able to use SQL in Visual Basic .NET? I have Visual Basic .NET and Access 2000. Do I need anything else? //OT

    Database csharp database business question

  • String to Integer?
    O oliver_twistor

    In my program I want the user to write in a TextBox. Then I want to check if the input contains only a numerical value. How can I do this? //OT

    Visual Basic question

  • Counting points
    O oliver_twistor

    Thanks. The problems are solved. //OT

    Visual Basic game-dev help question

  • Counting points
    O oliver_twistor

    Hi! I have a problem with my program. It is a small game, in which the two players (user and computer) receive one point when winning. First to three points will win the whole game. The problem is that after the players recieve their first point, and win again, they don't recieve any more points. What's the problem? Dim V_DuVin As Boolean Dim V_DatVin As Boolean Dim V_DinPoang As Integer Dim V_DatPoang As Integer If V_DuVin = True Then V_DinPoang = V_DinPoang + 1 Else If V_DatVin = True Then V_DatPoang = V_DatPoang + 1 End If //OT

    Visual Basic game-dev help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups