diff --git a/README.md b/README.md index 14de67e..2877ff8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ # finallab -This is going to be our final assignment for csc150. We are going to do reviews after this for our Final Exam. - -Have a wonderful Thanksgiving!!! +I fixed the bugs and formatting issues. diff --git a/buggy.c b/buggy.c index aae42b1..b0004ea 100644 --- a/buggy.c +++ b/buggy.c @@ -13,25 +13,25 @@ struct dog { int age; - char name = [10]; + char name[10]; // you dont need the = }; void main() { - struct (dog) thing1: + struct dog thing1; //removed the () and changed the : to a ; struct dog thing2; - thing1.age = [5]; + thing1.age = 5; //removed the () thing2.age = 13; - puts{"What is your dogs name? "}; - gets(thing1.names); + puts("What is your dogs name? "); //changed the {} to () + gets(thing1.name); //changed names to name strcpy(thing2.name, "Buster"); - printf("Name: %i\n",thing1.name ); - printf("Age: %i\n",thing1.age): - printf("Thing2 Name: %s\n,thing2.name); - printf("Thing2 Age %i\n',thing2.age); + printf("Thing1 Name: %s\n",thing1.name ); //changed to %s instead of %i. I also added Thing1 for continuity. + printf("Thing1 Age: %i\n",thing1.age ); //had a : instead of ;. I also added Thing1 for continuity. + printf("Thing2 Name: %s\n",thing2.name ); //needed a " after the \n + printf("Thing2 Age: %i\n",thing2.age ); //had a ' instead of ". I also added a : after age. } \ No newline at end of file diff --git a/buggy.exe b/buggy.exe new file mode 100644 index 0000000..fd23361 Binary files /dev/null and b/buggy.exe differ