yes, I've learned for and while loops, but do not totally understand them.
Type: Posts; User: girliegti
yes, I've learned for and while loops, but do not totally understand them.
Ok, I have to create a program that prints whether a number is in the Fibonacci sequence. This is what i have so far, but i could use some help:
#include <iostream>
#include <iomanip>...
Ok, thank you. That makes a lot more sense.
well if this is the case, why are the two codes that i gave wrong?
#include <iostream>
using namespace std;
int main (void){
for (int n=1; n<=10; n++);
cout << n << endl;
return 0;
}
Thanks for the help. Could you possibly explain why making the change is necessary? I'm new to programming, and am having some difficulty understanding what everything means.
thanks
I need to fix each of these codes so that it will print numbers between 1 and 10. what is wrong?
#include <iostream>
using namespace std;
int main (void){
for (int n=1; n<=10; n++);
cout <<...
here is the problem:
each of three people tosses a coin. if all three tosses are heads or all three tosses are tails, the game is a draw. if two of the tosses are one type and the third one is...