-
Posts
1,284 -
Joined
-
Last visited
Content Type
Forums
Status Updates
Blogs
Events
Gallery
Downloads
Store Home
Everything posted by ohJey
-
CAR IS BACK! I don't know if this is allowed, but my car was stolen in Cathedral City, California It's a 1998 Subaru Impreza Car was spotted in Desert Hot Springs on DILLON ROAD and in Palm Springs on CALLE ENCILIA near the Hilton Hotel, heading south If you know anyone from DHS/PALM SPRINGS please help me out! The car is hard to miss http://imgur.com/a/ND0Fv
-
I'm looking at the previous "no". If the previous statement (b^2-4ac>=0) is "no", then how could (b^2>>4ac) be "yes"?
-
Is this a logic error? This is the flow chart my teacher gave me for a program that solves the quadratic formula how could b^2-4ac not be >= 0 and b^2 be much greater than 4ac at the same time?
-
(for your application)
-
1. anything newer than office 2007 doesn't work 2. adobe software wont work or it wont use your hardware properly it's best to stay on windows
-
wow... I did i = i-number-1 and it worked
-
the problem is I'm trying to subtract the last dice roll and I can't figure out how to do it the lands.back() was me trying to get the last number in the vector... but it gives me random numbers
-
I'm trying to make the program simulate dice rolls... the dice add up until 100. If the dice "rolls" and the number is over 100, the roll is subtracted until 100 is landed upon. Ex: 98+4=102, then 102-4=98, then it keeps "rolling" and subtracting until 100 is landed on #include <iostream> #include <ctime> #include <cstdlib> #include <vector> using namespace std; int main() { srand(time(0)); int number, tries{0}; ///the number that the dice lands on vector<unsigned int> lands(5); for(int i=0; i<=100; ++i) { if(i<100) { number = rand()%6; i=number+i; cout << "i: " << i << endl; ++lands[number]; } if(i>100) { i=i-lands.back(); ///need help here cout << "lands.back(): " << lands.back() << endl; ///debugging cout << "i: " << i << endl; } else if(i==100) { cout << "i: " << i << endl; cout << "Done!" << endl; } } tries = lands[0]+lands[1]+lands[2]+lands[3]+lands[4]+lands[5]; cout << "Tries: " << tries; cout << "\nAfter " << tries << " throws the lands are: " << "\n#1= " << lands[0] << "\n#2= " << lands[1] << "\n#3= " << lands[2] << "\n#4= " << lands[3] << "\n#5= " << lands[4] << "\n#6= " << lands[5]; }
-
actually... I fixed it by adding the line studentID=sqrt(studentID); cout << studentID; I plugged 2742724836164 into a calculator and divided by 524142 and the answer was 524142, so it wasn't doing the square root anyways, thanks a lot
-
sorry, late reply but I got this
-
it's ok no hard feelings. I think I might understand now, but feel free to check it out
-
yeah... I'll have to ask my teacher... If there was a way to store the remainders after each modulus I think that would help
-
Students in my class have already done it. If you look at the program the number is encrypted by squaring it, doing modulo 90, and adding 33 to that character. Now I need to know how to reverse it.
-
I need to reverse the "encryption" done in this program cloudflare is acting up so I have to post as a pastebin http://pastebin.com/SyCS8CZh