Assuming for a moment that the code compiled and did something before you made your changes, I would suggest you do the following.
1. Put what you have to one side, and start over with a clean project containing just the code you have been given.
2. Make very small changes (a few lines at a time), and press compile. If it doesn't compile, then look at what you did and fix it before moving on. Copy small parts of your previous attempt if you think you can use them.
Eg this edit / compile sequence:
Code:
#include <stdio.h>
int main ( ) {
return 0;
}
/* Press "compile" */
#include <stdio.h>
int main ( ) {
printf( "hello world\n" )
return 0;
}
/* Press "compile" */
/* Get an error message */
/* Oops, forgot the ; - fix it and try again */
#include <stdio.h>
int main ( ) {
printf( "hello world\n" );
return 0;
}
/* Press "compile" */
/* OK, back on track */
#include <stdio.h>
int main ( ) {
for ( i = 0 ; i < 10 ; i++ ) {
printf( "hello world\n" );
}
return 0;
}
/* Press "compile" */
/* Get an error message */
/* Oops, forgot to declare i - fix it and try again */
#include <stdio.h>
int main ( ) {
int i;
for ( i = 0 ; i < 10 ; i++ ) {
printf( "hello world\n" );
}
return 0;
}
/* Press "compile" */
/* OK, back on track */
3. Every few iterations of step 2, you should be looking to running what you've just created to see if the new stuff you've added is doing what you want. If it isn't, think about how to fix it.
4. When you've got a useful bit of functionality working, create a backup of your project for safe keeping.
> Could someone have a look at my program and fix the errors for me please?
No, we're here to help you understand what is going on, suggest things for you to try, or things to read.
It is NOT a place to dump your coding attempts and expect someone else to fix it for you. You will never learn programming unless you can debug your own work.