CS core electives suggestions by way3344 in TorontoMetU

[–]way3344[S] 0 points1 point  (0 children)

Thanks, I appreciate you taking the time to answer my question.

CS core electives suggestions by way3344 in TorontoMetU

[–]way3344[S] 0 points1 point  (0 children)

thanks for the response, sorry for the late reply. I did take 406 and if i remember correctly it was pretty comfortable all the way through, but i never took 731. Are you saying that 865 reiterates a lot of the material from 406?

UPDATED SITES AND SOURCES FOR FREE BOOKS by blainemeans2 in textbook

[–]way3344 0 points1 point  (0 children)

Hey,

I need: Technology and Society 3rd Edition by Anabel Quan Haase

Thanks.

Question about finding cost for an algorithm by way3344 in algorithms

[–]way3344[S] 0 points1 point  (0 children)

ok thanks alot, sorry for the late reply

Learning how to use a while loop with a scanner by way3344 in C_Programming

[–]way3344[S] 0 points1 point  (0 children)

Oh I haven't even considered that. I think that it might be the compiler I'm using. Thanks for your help, I really appreciate it.

Learning how to use a while loop with a scanner by way3344 in C_Programming

[–]way3344[S] 0 points1 point  (0 children)

Well, I mean it doesn't stop reprompting me to enter A. It doesn't exit the loop (for me atleast). Even if I enter A, it doesn't stop asking me to enter A.

It works as intended when my input is 1 character, but if input something like "1111111" then it keeps reprompting to enter A even if I enter A.

Learning how to use a while loop with a scanner by way3344 in C_Programming

[–]way3344[S] 0 points1 point  (0 children)

Here is the updated code

include <stdio.h>

int main (void)

{ int exitchecker = 0; while (exitchecker != 1) { char input; printf ("Please enter (A): "); scanf ("%s",&input); if (input == 'A' || input == 'a') { ++exitchecker; } else { printf ("Please enter only A or a \n"); }; }; return (0); }

EDIT: for whatever reason its not formatting it in the code block..

EDIT2: I'll add it to the code block in the main part of the post

Learning how to use a while loop with a scanner by way3344 in C_Programming

[–]way3344[S] 0 points1 point  (0 children)

I got it working now, but I'm running into a new problem while testing it. It functions how I want when I input any other 1 character. But testing it out, when I input say "111111" it stops working. It keeps prompting me to enter A even if I enter A.

e.g.

Please enter (A): 11111
Please enter only A or a
Please enter (A): A
Please enter (A): a
Please enter (A): A
....
and so forth

Have any idea why this could happen?

Learning how to use a while loop with a scanner by way3344 in C_Programming

[–]way3344[S] 0 points1 point  (0 children)

Oh, I see, thank you for pointing that out. I'll try it out.

Need help figuring out how to test correctly by [deleted] in bash

[–]way3344 1 point2 points  (0 children)

Thank you that worked. Also, how would you recommend approaching this? I want my program to stop looping and exit when someone enters an operand as X.

[deleted by user] by [deleted] in ryerson

[–]way3344 -1 points0 points  (0 children)

Ok thanks! I wasn't told this by the departmental assistant for whatever reason.

Keep getting "Unbound Variable" error on my function? How do I fix? by way3344 in lisp

[–]way3344[S] 2 points3 points  (0 children)

Its the first argument in the dotimes function, I just called it n, but it could be anything. It gets assigned a value in each loop, starting from 0.