Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 pong project
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
qwertywert




PostPosted: Wed Apr 29, 2009 12:40 pm   Post subject: pong project

this is a code me and my partner modified for a project. how do i make the program ignore any input that is not an integer for the multiplication questions? any other suggestions are good too.


pong.t
 Description:
the modified code

Download
 Filename:  pong.t
 Filesize:  7.31 KB
 Downloaded:  76 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Wed Apr 29, 2009 12:52 pm   Post subject: RE:pong project

There is a problem with this attachment. Try again.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
tjmoore1993




PostPosted: Wed Apr 29, 2009 6:17 pm   Post subject: RE:pong project

I think this might help you.
http://compsci.ca/holtsoft/doc/strintok.html

It checks if a string can be converted to int... Smile
qwertywert




PostPosted: Fri May 01, 2009 1:14 pm   Post subject: Re: pong project

my bad


pong.t
 Description:

Download
 Filename:  pong.t
 Filesize:  7.31 KB
 Downloaded:  63 Time(s)

BigBear




PostPosted: Fri May 01, 2009 3:52 pm   Post subject: RE:pong project

You need to get the input as a string and then check to see if it is valid input or an integer use strintok in a loop
qwertywert




PostPosted: Thu May 07, 2009 1:06 pm   Post subject: Re: pong project

all right! after some tinkering i fixed the program, thanks for your help


ISU-Pong.t
 Description:
edited program

Download
 Filename:  ISU-Pong.t
 Filesize:  7.2 KB
 Downloaded:  84 Time(s)

Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: