So helpful! Thanks!
Type: Posts; User: Anhur
So helpful! Thanks!
Okay.
I've started writing my code again this time piece by piece. Focusing now on days and months (April, June, September and November).
#include <stdio.h>
int day, month, year;
bool...
Hi there,
Thanks again for those that helped with my Easter Sunday program. I was able to complete it. :rolleyes:
Currently I am working on a program where you enter in a date 14 03 2013 (Day,...
Here is my latest code:
I seem to have sorted out the months. Cant seem to get Days to display correctly.
#include <stdio.h>
int year, c, d, e, a, b, result, day, month;
int main() {
From what we have been told in the class the magic quantity is the thing that yields a 0 for any March result and a 1 for any April result.
We are then given the example: result/32
Not exactly...
Hi,
I'm tasked with creating a program that displays the date of Easter Sunday, and this is what I have been able to do far:
#include <stdio.h>
int year, c, d, e, a, b, result, day,...
Here is a copy of the task sheet.
Write a simple editor.
The editor should first ask the user for the name of a file to edit.
You may assume...
Hi there,
I'm having a lot of trouble trying to write an apparently "simple" editor. What do you make of my code? It's already late to hand in.
#include <stdio.h>
#include <conio.h>...
I honestly would not have a clue on how to write that. I was hoping to have this program written and working correctly by now, but seeing as it's due in a few hours, I'll just have to hand in what I...
"A live square stays alive if it has exactly two or exactly three live neighbours, otherwise it dies"
"A dead square becomes alive if it has exactly three live neighbours, otherwise it stays dead."
I don't understand what you mean by trigger, there is no such word in my instruction sheet. We have never covered anything like that in class.
int main() {
char c;
display(b1, b2);
...
int main() {
char c;
display(b1, b2);
printf("Hi! Would you like to play the Game of Life? (y/n)");
c = getchar();
while (c == 'y') {
new_board(b1, b2);
...
#include <stdio.h>
#include <string.h>
#include <conio.h>
void display(char b1[][21], char b2[][21]);
void new_board(char b1[][21], char b2[][21]);
void copy_back(char b1[][21], char...
Thanks guys!
I'll implement all of these changes now, and I'll post the new code as soon as I am done. :)
int next_cells(int p, int q) {
int count;
if (p != 0 && q != 19 && b1[p-1][q+1] == '*') {
count = p + q;
} else {
if (p != 0 && q != 19 && [p-1][q-1] ==...
My code hasn't changed. I just can't get my head around all the errors.
I can't even write the additional IF statements.
There need to be 8 IF statements within my next_calls function. One IF for each of the neighboring cells. At the moment I have only looked at [p-1][q+1], which I think is the north east cell.
Would someone be able to help me write the IF Statements?
I understand what you are saying, however I really would not have a clue about how to add an extra border to the array let alone finish this assignment. I have another one I have to start. Thanks for...
I'm just going to have to hand this in as is. This particular assignment will fail, but I won't end up with an incomplete. I know what this program has to do, and understand how the game works - I...
I need to protect against the possibility that [p][q] is an edge entry on b1. I not sure how I go about writing this.
I would have enjoyed my Programming class more, if I didn't have the added stress of three other papers throwing assignments at me. I can understand why there is such a high drop out/failure rate,...
Hi there,
I am a first year Programming student, and this is my first time asking for assistance. Due to Programming not being what I expected, this will probably be the last time I ever do any...