Recent content by ZakAttk1
-
Z
Which Fibonacci number would you like me to compute
Thanks I got it- ZakAttk1
- Post #5
- Forum: Programming and Computer Science
-
Z
Which Fibonacci number would you like me to compute
No, it just has to work- ZakAttk1
- Post #3
- Forum: Programming and Computer Science
-
Z
Which Fibonacci number would you like me to compute
I'm given a source file: int main() { bool running = true; string pre_sum; int fib_th; while (running) { count << "Which Fibonacci number would you like me to compute ? ('q' to quit) "; cin >> pre_sum; fib_th = atoi(pre_sum.c_str()); if ( pre_sum[0] == 'q' ) {...- ZakAttk1
- Thread
- Replies: 19
- Forum: Programming and Computer Science
-
Z
C/C++ How to Calculate the Average of Numbers from a File Using C++?
How do I use file streams to extract numbers from a file, add them up, and average them out?- ZakAttk1
- Thread
- File
- Replies: 1
- Forum: Programming and Computer Science
-
Z
Pointers not allowed to used iostream
So to mark the end of the string I'll have to do something with *word = '\0'. Is that relevant?- ZakAttk1
- Post #3
- Forum: Programming and Computer Science
-
Z
Pointers not allowed to used iostream
I want to infinitely print a saying to the console but I am not allowed to used iostream. I am using the function putc. I understand I need to use an infinite loop. So far I have: int main() { char *word; word = &SAYING[0]; while(true) { putc(*word, stdout); word ++...- ZakAttk1
- Thread
- Pointers
- Replies: 4
- Forum: Programming and Computer Science
-
Z
Finding Characters in Strings: timesFound() Function
I have an assignment for my CS class. It is the following: * * complete the function: * * timesFound(string searchIn, char searchFor); * * The function should return the number of times the * character searchFor appears in the string searchIn. * */ int timesFound(string...- ZakAttk1
- Thread
- Function Strings
- Replies: 2
- Forum: Programming and Computer Science