So as far as C is concerned your talking about this type of setup:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 100
Type: Posts; User: CrackerJack
So as far as C is concerned your talking about this type of setup:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 100
OK..so what your doing is using the random number w/ mod 101 (as percent I assume), and then using the if statement to force the outcome from that result? Well what if you want multiple percents? ...
What's happening guys?
Alright I had a real quick question. Is there a way you can munipulate the random function in VB so that you can specify how many times each number is picked?
Like say...
Thank you very much Prelude.
I was trying:
while( cin.eof )
also after I posted this. However it gave off the same results. I looked in my C++ book and says it is suppose to reconize...
Hey what's goin guys?
OK I got a real quick question for you all that has been bothering me. How can I get the EOF (or ctrl-d) to work on my C++ program. I know in C you can use getchar, but I...
AWESOME MAN!!
Always stupid stuff..:p
Thanks!
CJ
Hey everyone! Been a while since I have been on the board, but so far I have had no problems..lol Well this semesterI am learning C++ and ran into a bit of trouble.
The program is supposed to...
Yes my teacher is going over now how we are suppose to go about seperateing the functions. And I see how you did everything but this one part (which is in code tags). I'm sorry if I seem like a a$$...
Current code:
#include <stdio.h>
#include <string.h>
int main()
{
char buf[BUFSIZ];
That was it!!! Stupid scanf...lol
OK. My questions (which is most likely very simple to all of you) is after I changed that I am not able to use my original error checking method. So,....
1)...
Well I did that, but then it just runs through all the printf's. It doesn't allow any input at all!!
if (choice == 1)
printf("Please enter the text you wish to encrypt: ");
fgets(buf,...
I know, I know...Frustrating b/c that code from the FAQ looks like mine yet mine does not work. I've read the chapter over AGAIN and see what quzah meant by there being no Null w/o a error. So, my...
OK. So would that mean I have to put something inside the statement to control that? Because I can't figure out what part of the while loop I would need to change.
And you would figure with...
Well my teacher told us she did not want us to hardcode stuff into the program, but to define it so it could be changed. But I'll change the main. From my understanding though, doesn't main give an...
Jim I understand where your coming from, however I am a newbie to all this stuff. So, I think for me to understand all the logic is the best thing to accomplish first. I can always go back and...
Hey guys!
This is one of those end-of-year deals, so I am getting over my head trying to learn some new things to impress the teacher. We have not gone over strings yet, but for the code I have it...
It seems as though it is working, so I am hapy there. However, where would I start to through in the leap year if?
CJ
#include <stdio.h>
int day_of_year(int a, int b, int c);
Well it seems like it would work. Trying to work on the code now. Except then I really would not need the year except for the leap years right?
Which would add a day if I am not mistaken.
CJ
Hey guys...Happy Thanksgiving!! :)
Well as for me I am at home doing homework, and I ran into a bit of a snag. The problem is I have to return an integer value ( 1 to 366) when entering the...
OK...so when you put it in the first for loop it keeps it on the top row correct? Me putting it in the inside for gave a value of zero and since nothing is lower then zero...
CJ
Yeah...I can think of one as well. However, seeing as I am myself learning the general stuff of C right now..."I think" the AND and OR operators are an easy option. :p
At least with what little...
I've tried that already and it either gives me zero or the last array of numbers.
Using my novice logic ( :D )...I can see a simple way of doing that with just 3 IF statements and 1 ELSE statement.
Try using a combination of AND or OR operators (like Salem's example) in each of...
Told ya I get confuzed again! :p
I need to get the lowest quiz score from each of them! My current for statement returns the last quiz entry. I tried putting the printf inside the second 'for'...
WOW...I like both of those ways!
And for once I understand both of them...lol
I'm try both and see which one I like better..:p
However, there is a second part so I will most likely be...