November 2013
Beginner
325 pages
9h 47m
English
Now that you have realized that you need a function, you need to write one. Open main.c in your ClassCertificates project and write a new function named congratulateStudent. This function should go just before main() in the file.
#include <stdio.h>
void congratulateStudent(char *student, char *course, int numDays)
{
printf("%s has done as much %s Programming as I could fit into %d days.\n",
student, course, numDays);
}
int main(int argc, const char * argv[])
{
...
(Wondering what the %s and %d mean? Puzzled by the type char *? Hold on for now; we will get there.)
Now edit main() to use your new function:
int main (int argc, const char * argv[])
{
congratulateStudent("Kate", "Cocoa", 5);
congratulateStudent("Bo", ...Read now
Unlock full access