- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.) Made this in cpp.sh Why would I need the x=y+1-1;? x=y; just doesnt seem to work Why is this? And I know my coding … |
|
How do I make a line of code that would go back to a part of a program without making it a loop? For example ###Code I don't want repeated### some line for later to come back (line 2) $$$code I want to repeat$$$ jump back to line 2 |
|
If I made a program, and I wanted a random number. I know it's not compleatly possible, since it takes numbers out of the ram. Although there must be worse and better ways to do this. What are the better ways do do it. |
|
Why wont the if look for both Peter and John? #include <iostream> #include <string> using namespace std; int main() { string Name, Mood; // obvious string cout << "Whats your name?" << endl; cin >> Name; if (Name == "Peter"|| "John") { cout << "Hello, master! How are we feeling … |