Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Coding and Programming > Application Programming

Reply
 
LinkBack Thread Tools
Old 06-12-05   #1 (permalink)
Programmer
 
speX's Avatar
 
intel nvidia

Join Date: Mar 2005
Posts: 206

Rep: 2 speX Unknown
Unique Rep: 2
Trader Rating: 0
Default Turing help (for school)

I have a question for my math game, suppositly after every level (10 questions) the # of digits for the quetsions are suppose to increase... like 8+6 would be level one and level 2 would be 88+66 and level 3 would be 888+666 etc..... how do i make the digits increase ( max number is 9 in level one, level 2 max number 99, level 3 max number 999) (these numbers are created at random.....)plz help
__________________
System: Intel
CPU
Q6600 G0
Motherboard
Asus P5K Deluxe
Memory
Corsair DDR2 XMS 2GB
Graphics Card
BFG 8800 GTS OC
Hard Drive
Seagate 250GB SATAII, Seagate 500GB SATAII
Sound Card
Onboard
Power Supply
OCZ Game X Stream 700 WATTS
CPU cooling
stock
GPU cooling
stock
OS
Windows Vista 32 bit
Monitor
LG 21.6 Inch Widescreen
speX is offline   Reply With Quote
Old 06-12-05   #2 (permalink)
Site Old-timer
 
Lostnhell's Avatar
 
amd nvidia

Join Date: Sep 2004
Location: Virginia Beach, VA
Posts: 5,765

Rep: 491 Lostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven memberLostnhell is a proven member
Unique Rep: 265
FAQs Submitted: 10
Folding Team Rank: 2553
Hardware Reviews: 11
Trader Rating: 3
Default

Quote:
Originally Posted by speX
I have a question for my math game, suppositly after every level (10 questions) the # of digits for the quetsions are suppose to increase... like 8+6 would be level one and level 2 would be 88+66 and level 3 would be 888+666 etc..... how do i make the digits increase ( max number is 9 in level one, level 2 max number 99, level 3 max number 999) (these numbers are created at random.....)plz help
You can use the mod value (% or mod) and use a counter to figure the values of 10 within an if statement.

example:
if cntr%10=0 then
diff = lv2
__________________
System: My System
CPU
Athlon 3200+
Sound Card
onboard
OS
Slackware-current
Lostnhell is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 06-12-05   #3 (permalink)
News Fiend
 
Orange's Avatar
 
intel nvidia

Join Date: Mar 2005
Location: West Chester, PA
Posts: 3,828

Rep: 230 Orange is acknowledged by manyOrange is acknowledged by manyOrange is acknowledged by many
Unique Rep: 123
FAQs Submitted: 4
Folding Team Rank: 1112
Trader Rating: 1
Default

is this game like for 9 yr olds?, but what you mean change the numberS?
__________________
Selling Current Rig
FAQ: What is HDCP?
FAQ: Stop unwanted Programs Starting at start up
CPUz Validation @4.01Ghz Officially 4.01GHz
"Conroe can eat anything clock per clock|now days its not about intel vs amd or conroe vs am2 |its all about Conroe vs Yonah vs Dothan vs Merom"

System: My System
CPU
Pentium4 2.4AE@4.01GHz
Motherboard
Asus P4P800-SE
Sound Card
SoundBlaster Live! PCI
Power Supply
450Watt Antec Smartpower
Case
Flashing one
OS
Windows XP SP2
Monitor
Dell e773
Orange is offline I fold for Overclock.net   Reply With Quote
Old 06-12-05   #4 (permalink)
Love's Astra's :)
 
PetrolHead's Avatar
 
amd ati

Join Date: Apr 2005
Location: UK, Scotland
Posts: 2,378

Rep: 296 PetrolHead is a proven memberPetrolHead is a proven memberPetrolHead is a proven member
Unique Rep: 181
FAQs Submitted: 2
Folding Team Rank: 2773
Trader Rating: 9
Default

what language
VB, C++

System: My System
CPU
AMD 3500 Winchester CBBFD
Motherboard
DFI NF4 SLI-D
Memory
OCZ Platinum TCCD (2x512)
Graphics Card
ATI X800XT
Hard Drive
36GB WD Raptor
Sound Card
(DFI) Karajan 7.1
Power Supply
Coolermaster450W Real PWR
Case
Antec Super Lanboy
OS
MS WinXP Pro + SP2
Monitor
Dell 15" (Crap)
PetrolHead is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 06-12-05   #5 (permalink)
Programmer
 
speX's Avatar
 
intel nvidia

Join Date: Mar 2005
Posts: 206

Rep: 2 speX Unknown
Unique Rep: 2
Trader Rating: 0
Default

turing!! its in the name haha ya this is for the age of 9 year olds... (school project) etc.. ya
__________________
System: Intel
CPU
Q6600 G0
Motherboard
Asus P5K Deluxe
Memory
Corsair DDR2 XMS 2GB
Graphics Card
BFG 8800 GTS OC
Hard Drive
Seagate 250GB SATAII, Seagate 500GB SATAII
Sound Card
Onboard
Power Supply
OCZ Game X Stream 700 WATTS
CPU cooling
stock
GPU cooling
stock
OS
Windows Vista 32 bit
Monitor
LG 21.6 Inch Widescreen
speX is offline   Reply With Quote
Old 06-12-05   #6 (permalink)
4.0ghz
 
ouroboros1827's Avatar
 
intel

Join Date: Nov 2004
Location: Northern VA
Posts: 2,400

Rep: 258 ouroboros1827 is a proven memberouroboros1827 is a proven memberouroboros1827 is a proven member
Unique Rep: 190
Folding Team Rank: 1746
Hardware Reviews: 2
Trader Rating: 0
Default

this should work in most languages
newNumLevels = oldNumLevels * 10 + oldNumLevels

yeah. that should be it.

i'm still confused on what it does, but i hope i can at least answer your question
__________________
Overclocking in a nutshell: CyberDruid's BOOK | EvilXP's List of OCing Guides | DeathONator's Ultimate Overclocking Guide | The TOS
Quote:

In other words: Removed code is debugged code, and it certainly doesn't use any memory or CPU time; so even better if you don't write it.

System: Macbook
CPU
Core 2 Duo 2Ghz
Motherboard
Apple
Memory
4Gb
Graphics Card
GMA 950
Hard Drive
80Gb
Sound Card
Intel HD Audio (?)
Case
White & Shiny
OS
OS X 10.5
Monitor
13.3" 1280x800
ouroboros1827 is offline I fold for Overclock.net Overclocked Account   Reply With Quote
Old 06-12-05   #7 (permalink)
Programmer
 
speX's Avatar
 
intel nvidia

Join Date: Mar 2005
Posts: 206

Rep: 2 speX Unknown
Unique Rep: 2
Trader Rating: 0
Default

alrite thx
ill try that
__________________
System: Intel
CPU
Q6600 G0
Motherboard
Asus P5K Deluxe
Memory
Corsair DDR2 XMS 2GB
Graphics Card
BFG 8800 GTS OC
Hard Drive
Seagate 250GB SATAII, Seagate 500GB SATAII
Sound Card
Onboard
Power Supply
OCZ Game X Stream 700 WATTS
CPU cooling
stock
GPU cooling
stock
OS
Windows Vista 32 bit
Monitor
LG 21.6 Inch Widescreen
speX is offline   Reply With Quote
Old 06-12-05   #8 (permalink)
Programmer
 
speX's Avatar
 
intel nvidia

Join Date: Mar 2005
Posts: 206

Rep: 2 speX Unknown
Unique Rep: 2
Trader Rating: 0
Default

it doesnt really work... but i think thats the basic idea... any other suggestions?
__________________
System: Intel
CPU
Q6600 G0
Motherboard
Asus P5K Deluxe
Memory
Corsair DDR2 XMS 2GB
Graphics Card
BFG 8800 GTS OC
Hard Drive
Seagate 250GB SATAII, Seagate 500GB SATAII
Sound Card
Onboard
Power Supply
OCZ Game X Stream 700 WATTS
CPU cooling
stock
GPU cooling
stock
OS
Windows Vista 32 bit
Monitor
LG 21.6 Inch Widescreen
speX is offline   Reply With Quote
Old 06-12-05   #9 (permalink)
Bifford
 
BFRD's Avatar
 
intel nvidia

Join Date: Dec 2004
Location: Carrollton, TX
Posts: 4,414

FAQs Submitted: 8
Folding Team Rank: 31
Hardware Reviews: 2
Trader Rating: 11
Default

Quote:
Originally Posted by speX
it doesnt really work... but i think thats the basic idea... any other suggestions?
Create a function that generates a random number between 1 & 9. Then concatenate to form a larger number (string). I am not sure about this programing language as I have never used it before, you may run into some typing issues (strings vs integers and whatnot). Also, how does your random number function? Does it return a random float between 0 & 1? There are plenty of options, I just need a bit more information about this language.
__________________
Helpful Posts (Hopefully )
Overclocker's Calculator
Photo Editing - B&W w/Color Accents

System: Main Rig
CPU
E6700 Conroe
Motherboard
Abit QuadGT
Memory
2GB G.Skill PC2 8000 (HZ)
Graphics Card
EVGA 8800GTX
Hard Drive
150 GB Raptor X / 300GB Storage
Sound Card
Audigy 2 ZS
Power Supply
PCP&C Silencer 750
Case
Sigma Shark
CPU cooling
Stock (for now)
GPU cooling
Stock
OS
Vista Ultimate
Monitor
Dual Samsung 204b
BFRD is offline I fold for Overclock.net Overclocked Account BFRD's Gallery   Reply With Quote
Old 06-12-05   #10 (permalink)
Programmer
 
speX's Avatar
 
intel nvidia

Join Date: Mar 2005
Posts: 206

Rep: 2 speX Unknown
Unique Rep: 2
Trader Rating: 0
Default

there are 3 numbers (generated at random)
1 number is the first number of the question
the second number from 0-2 will determin if its addition, subtaction or multiply
the third number will be the second number of the question

so after running after the 3 lines of code and a few if statments there will be an equation

1+1, 2-1 , or 3X3

now thats level one

after 10 questions it will reach level 2
my question is how to make it from 1+1 or 2-1 etc to 11+11 or 21-20 after the completion of level 1 and when level 2 is done there should be 3 digits like 111+111 or 222-111 etc..... and so on as the levels increase like when the user reaches level 6, there should be 6 digits in the equation.... what i want to know is HOW to increase the digits
i
__________________
System: Intel
CPU
Q6600 G0
Motherboard
Asus P5K Deluxe
Memory
Corsair DDR2 XMS 2GB
Graphics Card
BFG 8800 GTS OC
Hard Drive
Seagate 250GB SATAII, Seagate 500GB SATAII
Sound Card
Onboard
Power Supply
OCZ Game X Stream 700 WATTS
CPU cooling
stock
GPU cooling
stock
OS
Windows Vista 32 bit
Monitor
LG 21.6 Inch Widescreen
speX is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 03:43 AM.


Overclock.net is a Carbon Neutral Site Creative Commons License Internet Security By ControlScan

Terms of Service / Forum Rules | Privacy Policy | Advertising | Become an Official Vendor
Copyright © 2008 Shogun Interactive Development. Most rights reserved.
Page generated in 0.34898 seconds with 8 queries