Ok first problem
1) Your function
int grade (int y)
all this function does is multiplies whatever number you pass it by 10
. It does not do anything to determine if the student has a passing grade.
A) First determine what the passing grade limit is. Then you are going to have to check the number the user entered against the passing grade number to see if its higher then or less then.
2) You never called you function in
A) To call a function you do something like this If I use your code as a example.
int student; // Declares a variable to hold the students grade
cin >> student; // User inputs thier grade into the variable
grade(student); // Calls your function
3) You never asked the user for their grade! And you never created a variable to hold the grade!
A) Look up how input and output work (
). http://www.cplusplus.com/doc/tutorial/basic_io/. And also if you don't know about variables by now I highly reccomend you pay attention more!!!!
4) I dont think you understand what a for loop does, and are using it incorrectly.
A) Check out here for more info on control structers. http://www.cplusplus.com/doc/tutorial/control/
4) The teacher said to print a message that tells the user if they have passed or not. The only
you have is this
and all that does is print "indicating" 60 times on the console. And not to mention you have no spaces between anything so it will error out.
A) Again check out how input and output work.
5) Your function is after main so even if you did call it in main it wouldn't work.
A) Put a function prototype above main, something like this
int grade(int y);
. If you need more info about function check here http://www.cplusplus.com/doc/tutorial/functions/
I think that covers most of it so their is your HELP! Also next time when people try to help you please act civilly. Also if they are teaching functions in your class already and this is what you can write only I would highly recommend you start over from the beginning.