I'm using Dev C++.
Yes, it did run.
Also, I'm pretty sure everything had a closing brace. Count the braces, there are 4 on top and 4 on bottom.
[Block3]'is for guessing game Prompt "Guess which number i'm thinking of."; guessnumber let number = int(rdn (number < 10))''' Need help in this line! select case number case guessnumber = number Notice "Correct!" goto [Block2] case else notice "Wrong"[try$] Prompt "Try again?"; try$ ' Try again? $ variable select case lower$(try$) case "yes" goto [BLock3] case "no" end case else Notice "What?" goto [try$] end select end select
class main(wx.Frame): def __init__(self, parent):... bTestText = wx.Button(panel, label = 'test', pos = (100,100)) evt = kickBox().testText(EVT_TEXT) self.Bind(wx.EVT_BUTTON, evt, bTestText)...class kickBox(main): def __init__(self): self.origin = wx.Frame.__init__(self, wx.GetApp().TopWindow, title='HTML Kickbox', size=(600,600), name = "kickBox") self.textbox = wx.TextCtrl(self,1,style=wx.TE_MULTILINE) self.textbox.SetEditable(False)... def testText(self, evt): self.textbox.AppendText("test") print "works"...
>>>works
string line; ifstream myfile ("file.txt"); if (myfile.is_open()) { int i = 1; while (!myfile.eof()) { getline (myfile, line); if (i == 1) //first line contains the value. Address = atoi(line.c_str()); if (i == 2) //second line ect. blah blah blah, i++; } myfile.close(); }
namespace GuessingGame{ class MainGame // TODO Make different functions for the many things I've done in the class { public static void Main() { // Declarations of variables string name; /* The name of the user */ string guessednumber; /* The number inputted by the user */ string truenumber = "7"; // TODO Make this a random integer string playagain; string sure; // Console I.O. /* This asks for the users name and what number they are guessing */ Console.Out.WriteLine("Please enter your name..."); name = Console.In.ReadLine(); Console.Out.WriteLine("Hello {0}",name); Console.Out.WriteLine("Now enter a number to guess..."); guessednumber = Console.In.ReadLine(); // Decision Making if (guessednumber == truenumber) /* The IF determines whether the guessed number is equal to the true number */ { Console.Out.WriteLine("Correct!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") /* This IF determines whether the user wants to play again */ { GuessingGame.MainGame.Main(); } else if (playagain == "no") { Console.Out.WriteLine("Are you sure?"); sure = Console.In.ReadLine(); if (sure == "yes") /* This determines whether the user us sure they want to re-play */ { Console.ReadKey(); } } } else { Console.Out.WriteLine("Wrong!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") { GuessingGame.MainGame.Main(); } } } }
namespace GuessingGame{ class MainGame // TODO Make different functions for the many things I've done in the class { public static void Main() { // Declarations of variables string name; /* The name of the user */ string guessednumber; /* The number inputted by the user */ string truenumber = "7"; // TODO Make this a random integer string playagain; string sure; // Console I.O. /* This asks for the users name and what number they are guessing */ Console.Out.WriteLine("Please enter your name..."); name = Console.In.ReadLine(); Console.Out.WriteLine("Hello {0}",name); Console.Out.WriteLine("Now enter a number to guess..."); guessednumber = Console.In.ReadLine(); // Decision Making if (guessednumber == truenumber) /* The IF determines whether the guessed number is equal to the true number */ { Console.Out.WriteLine("Correct!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") /* This IF determines whether the user wants to play again */ { GuessingGame.MainGame.Main(); } else if (playagain == "no") { Console.Out.WriteLine("Are you sure?"); sure = Console.In.ReadLine(); if (sure == "yes") /* This determines whether the user us sure they want to re-play */ { Console.ReadKey(); } } } else { Console.Out.WriteLine("Wrong!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") { GuessingGame.MainGame.Main(); } } } }
Random r = new Random();r.next(min, max);
Random r = new Random();r.next(min, max);
using System;// TODO Finish documentingnamespace GuessingGame{ class MainGame // TODO Make different functions for the many things I've done in the class { public static void Main() { // Declarations of variables string name; /* The name of the user */ string guessednumber; /* The number inputted by the user */ Random truenumber = "7"; // TODO Make truenumber a random Integer string playagain; string sure; // Console I.O. /* This asks for the users name and what number they are guessing */ Console.Out.WriteLine("Please enter your name..."); name = Console.In.ReadLine(); Console.Out.WriteLine("Hello {0}",name); Console.Out.WriteLine("Now enter a number to guess..."); guessednumber = Console.In.ReadLine(); // Decision Making if (guessednumber == truenumber) /* The IF determines whether the guessed number is equal to the true number */ { Console.Out.WriteLine("Correct!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") /* This IF determines whether the user wants to play again */ { GuessingGame.MainGame.Main(); } else if (playagain == "no") { Console.Out.WriteLine("Are you sure?"); sure = Console.In.ReadLine(); if (sure == "yes") /* This determines whether the user us sure they want to re-play */ { Console.ReadKey(); } } } else { Console.Out.WriteLine("Wrong!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") { GuessingGame.MainGame.Main(); } } } }}
using System;// TODO Finish documentingnamespace GuessingGame{ class MainGame // TODO Make different functions for the many things I've done in the class { public static void Main() { // Declarations of variables string name; /* The name of the user */ string guessednumber; /* The number inputted by the user */ Random truenumber = "7"; // TODO Make truenumber a random Integer string playagain; string sure; // Console I.O. /* This asks for the users name and what number they are guessing */ Console.Out.WriteLine("Please enter your name..."); name = Console.In.ReadLine(); Console.Out.WriteLine("Hello {0}",name); Console.Out.WriteLine("Now enter a number to guess..."); guessednumber = Console.In.ReadLine(); // Decision Making if (guessednumber == truenumber) /* The IF determines whether the guessed number is equal to the true number */ { Console.Out.WriteLine("Correct!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") /* This IF determines whether the user wants to play again */ { GuessingGame.MainGame.Main(); } else if (playagain == "no") { Console.Out.WriteLine("Are you sure?"); sure = Console.In.ReadLine(); if (sure == "yes") /* This determines whether the user us sure they want to re-play */ { Console.ReadKey(); } } } else { Console.Out.WriteLine("Wrong!"); Console.Out.WriteLine("Would you like to play again?"); playagain = Console.In.ReadLine(); if (playagain == "yes") { GuessingGame.MainGame.Main(); } } } }}
Random truenumber = new Random();truenumber.Next(1, 15);