Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "stdio.h"
- #include "string.h"
- #include "stdlib.h"
- //Define prototypes
- void func(float grade, char *pntletter);
- int _tmain(int argc, _TCHAR* argv[])
- {
- char aGrade;
- float number = 95.5;
- func(number, &aGrade);
- printf("%c\n", aGrade);
- system("pause");
- return(0);
- }
- void func(float grade, char *pntletter) {
- if (grade >= 60) {
- *pntletter = 'P';
- }
- else
- *pntletter = 'F';
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement